OFFSET
1,2
COMMENTS
Largest number which can be written in base n using d+1 times the digit d, d=0,...,n-1. (Or: such that for each k=1,...,n, some digit is used exactly k times.)
EXAMPLE
Written in the respective bases, a(2) = 6 = 110[2], a(3) = 714 = 222110[3], a(4) = 1047188 = 33322110[4], etc.
PROG
(PARI) a(b)=sum(i=1, b-1, (b^(i+1)-1)\(b-1)*b^(i*(i+1)\2)*i)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Nov 02 2012
STATUS
approved