OFFSET
1,2
COMMENTS
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..388
J. Sondow and K. MacMillan, Reducing the Erdős-Moser equation 1^n + 2^n + ... + k^n = (k+1)^n modulo k and k^2, Integers 11 (2011), #A34.
J. Sondow and E. Tsukerman, The p-adic order of power sums, the Erdos-Moser equation, and Bernoulli numbers, arXiv:1401.0322 [math.NT], 2014; see section 4.
Wikipedia, Giuga number
Wikipedia, Primary pseudoperfect number
FORMULA
a(n) (mod n) = A235138(n).
EXAMPLE
a(4) = 30 since 1^(phi(4)) + 2^(phi(4)) + 3^(phi(4)) + 4^(phi(4))= 1^2 + 2^2 + 3^2 + 4^2 = 1 + 4 + 9 + 16 = 30.
a(5) = 979, since phi(5) = 4 and 1^4 + 2^4 + 3^4 + 4^4 + 5^4 = 1 + 16 + 81 + 256 + 625 = 979.
a(6) = 91, since phi(6) = 2 and 1^2 + 2^2 + 3^2 + 4^2 + 5^2 + 6^2 = 1 + 4 + 9 + 16 + 25 + 36 = 91.
MATHEMATICA
a[n_] := Sum[PowerMod[i, EulerPhi@n, n], {i, n}]
PROG
(PARI) a(n) = sum(k=1, n , k^eulerphi(n)); \\ Michel Marcus, Oct 21 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Sondow and Emmanuel Tsukerman, Jan 03 2014
STATUS
approved