OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = ds_prime(n)(n^4), where ds_prime(n) = digital sum base the n-th prime.
a(n) = n^4 - (prime(n)-1)*Sum{k>0} ( floor(n^4/prime(n)^k) ).
EXAMPLE
a(2) = ds_prime(2)(2^4) = ds_3(16) = 1+2+1 = 4;
a(6) = ds_prime(6)(6^4) = ds_13(1296) = 7+8+9 = 24.
MATHEMATICA
Table[Total[IntegerDigits[n^4, Prime[n]]], {n, 50}] (* G. C. Greubel, Sep 23 2016 *)
PROG
(PARI) a(n) = vecsum(digits(n^4, prime(n))); \\ Michel Marcus, Sep 24 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Hieronymus Fischer, Dec 24 2007
STATUS
approved