Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,22 @@
function is_palindrome(n) {
return n == Number([...String(n)].toReversed().join(""));
}
function is_gapful(n) {
const digits = [...String(n)].map(Number);
const div = 10 * digits.shift() + digits.pop();
return Number.isInteger(n / div);
}
for (let d = 2; d <= 9; d++) {
console.log(`|Palindromic gapful numbers ending in ${d}|`);
let nums = [], n = 100 + d;
while (nums.length < 100) {
if (is_gapful(n) && is_palindrome(n)) {
nums.push(n);
}
n += 10;
}
console.log(`First 20: ${nums.slice(0, 20).join(" ")}`);
console.log(`86th-100th: ${nums.slice(85, 100).join(" ")}`);
}