login
A388288
The least number whose sum of digits in base b is divisible by b for all bases b = 2, 3, ..., n.
1
3, 5, 85, 85, 377, 14727, 46881, 524108, 524108, 27579604, 88382164, 1233719644, 51601871885, 1729314553686, 5091604885086
OFFSET
2,1
MATHEMATICA
bmax[n_] := Module[{b = 2}, While[Divisible[DigitSum[n, b], b], b++]; --b];
seq[nmax_] := Module[{s = {}, bm = 1}, Do[b = bmax[n]; If[b > bm, s = Join[s, ConstantArray[n, b - bm]]; bm = b], {n, 3, nmax}]; s]; seq[100000]
PROG
(PARI) bmax(n) = {my(b = 2); while(!(sumdigits(n, b) % b), b++); b--; b; }
list(nmax) = {my(bm = 1); for(n = 3, nmax, b = bmax(n); if(b > bm, for(i = 1, b-bm, print1(n, ", ")); bm = b)); }
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Amiram Eldar, Sep 16 2025
EXTENSIONS
a(15)-a(16) from Giovanni Resta, Sep 16 2025
STATUS
approved