OFFSET
0,3
COMMENTS
Every nonnegative integer appears finitely many times in this sequence.
LINKS
FORMULA
a(A059590(n)) = n.
a(k!) = 2^(k-1) for any k > 0.
EXAMPLE
For n = 42: the factorial base expansion of 42 is "1300" and has maximum digit 3, so the base-4 expansion of a(42) is "1300", and a(42) = 112.
PROG
(PARI) a(n) = { my (d = []); for (r = 2, oo, if (n==0, return (if (#d, fromdigits(d, vecmax(d)+1), 0)), d = concat(n%r, d); n \=r; ); ); }
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, Dec 14 2023
STATUS
approved