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,25 @@
function factorial(n) {
if (n <= 1) {
return 1;
}
let a = [...Array(n + 1).keys()];
a.shift();
return a.reduce((x, y) => x * y);
}
function fact_digsum(n, b) {
if (n > b - 1) {
return factorial(n % b) + fact_digsum(Math.floor(n / b), b);
}
return factorial(n);
}
for (let i = 9; i <= 12; i++) {
console.log(`Factorions in base ${i}:`);
for (let j = 1; j < 1499999; j++) {
if (j == fact_digsum(j, i)) {
console.log(j);
}
}
console.log();
}