OFFSET
1,2
COMMENTS
Partial sums of A055565.
FORMULA
a(n) = a(n-1) + sum of decimal digits of n^4.
a(n) = sum(k=1, n, sum(m=0, floor(log(k^4)), floor(10((k^4)/(10^(((floor(log(k^4))+1))-m)) - floor((k^4)/(10^(((floor(log(k^4))+1))-m))))))).
General formula: a(n)_p = sum(k=1, n, sum(m=0, floor(log(k^p)), floor(10((k^p)/(10^(((floor(log(k^p))+1))-m)) - floor ((k^p)/(10^(((floor(log(k^p))+1))-m))))))). Here a(n)_p is a sum of digits of k^p from k=1 to n.
EXAMPLE
a(3) = sum_digits(1^4) + sum_digits(2^4) + sum_digits(3^4) = 1 + 7 + 9 = 17.
MATHEMATICA
f[n_] := Block[{s = 0, k = 1}, While[k <= n, s = s + Plus @@ IntegerDigits[k^4]; k++ ]; s]; Table[ f[n], {n, 50}] (* Robert G. Wilson v, Nov 18 2004 *)
Accumulate[Table[Total[IntegerDigits[n^4]], {n, 60}]] (* Harvey P. Dale, Jun 08 2021 *)
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Yalcin Aktar, Nov 16 2004
EXTENSIONS
Edited and extended by Robert G. Wilson v, Nov 18 2004
Existing example replaced with a simpler one by Jon E. Schoenfield, Oct 20 2013
STATUS
approved