OFFSET
2,1
COMMENTS
a(n) has an even number of digits in all even bases b <= n.
a(8) <= 795482814912042180, a(9) and a(10) <= 836119295625913740. - Giorgos Kalogeropoulos, Aug 09 2023
a(8) and a(9) <= 789730327537467540, a(10) <= 789731071815355740, a(11) <= 789731549802436500. - Jason Yuen, May 17 2024
a(8) > A144812(10000) = 16960567248690 (last term in b-file for A144812). - Pontus von Brömssen, May 19 2024
EXAMPLE
For n = 4, 141 is 10001101 in binary with average digit 1/2, 12020 in base 3 with average digit 2/2 = 1, and 2031 in base 4 with average digit 3/2. No smaller number has this property, so a(4) = 141.
PROG
(PARI) isokb(k, b) = my(d=digits(k, b)); vecsum(d)/#d == (b-1)/2;
isok(k, n) = for (b=2, n, if (!isokb(k, b), return(0)); ); 1;
a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Aug 05 2023
CROSSREFS
KEYWORD
nonn,base,more,hard
AUTHOR
Pontus von Brömssen, Aug 04 2023
STATUS
approved