login
A135101
Digital sum (base the n-th prime) of n^n.
2
1, 2, 3, 10, 15, 24, 55, 46, 71, 116, 101, 180, 213, 196, 205, 276, 307, 444, 337, 610, 621, 646, 687, 808, 985, 876, 921, 996, 1049, 1184, 1417, 1576, 1665, 1576, 2127, 1836, 2377, 1660, 2201, 2088, 2731, 2844, 2847, 2944, 3317, 3232, 3503, 3294, 3165
OFFSET
1,2
LINKS
FORMULA
a(n) = ds_prime(n)(n^n), where ds_prime(n) = digital sum base the n-th prime.
a(n) = n^n - (prime(n)-1)*Sum{k>0} ( floor(n^n/prime(n)^k) ).
EXAMPLE
a(2) = ds_prime(2)(2^2) = ds_3(4) = 1+1 = 2;
a(10) = ds_prime(5)(5^5) = ds_11(3125) = 2+3+9+1 = 15.
MATHEMATICA
Table[Total[IntegerDigits[n^n, Prime[n]]], {n, 50}] (* G. C. Greubel, Sep 23 2016 *)
PROG
(PARI) a(n) = vecsum(digits(n^n, prime(n))); \\ Michel Marcus, Sep 24 2016
KEYWORD
nonn,base
AUTHOR
Hieronymus Fischer, Dec 24 2007
STATUS
approved