OFFSET
0,1
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
EXAMPLE
a(9) = 9 because 10^9 + 1 is written as 4022000000001_5, and 2^9 = 512 is written as 4022_5.
MAPLE
A053824 := proc(n) add(d, d=convert(n, base, 5)) ; end proc:
MATHEMATICA
Table[Total[IntegerDigits[10^n+1, 5]], {n, 0, 60}] (* Harvey P. Dale, Jun 10 2018 *)
PROG
(PARI)\\ L is the list of the N digits of 2^n in quinary.
convert(n)={ n = 2^n; x = n; N = floor(log(n)/log(5))+1;
L = listcreate(N);
while(x, n=floor(n/5); r= x-5*n; listput(L, r); x = n; );
L; N};
for(n=0, 100, convert(n); s=0; for(i=1, N, s+=L[i]; ); print1(s+1, ", "));
(PARI) a(n) = sumdigits(10^n+1, 5); \\ Michel Marcus, Sep 20 2019
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Washington Bomfim, Jan 02 2011
EXTENSIONS
Formula corrected by Robert Israel, Sep 19 2019
STATUS
approved