OFFSET
1,2
COMMENTS
It follows from Fermat's little theorem that a(n) is congruent to -1 mod the n-th prime.
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section A17.
Paulo Ribemboim, The Little Book of Big Primes, New York, Springer-Verlag (1991): 17.
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..76
FORMULA
a(n) = Sum_{i=1..prime(n)-1} i^(prime(n) - 1).
EXAMPLE
a(2) = 5 because, since 3 is the second prime, we have 1^2 + 2^2 = 1 + 4 = 5.
a(3) = 354 because, since 5 is the third prime, we have 1^4 + 2^4 + 3^4 + 4^4 = 1 + 4 + 81 + 256 = 354.
MATHEMATICA
Table[Sum[i^(Prime[n] - 1), {i, Prime[n] - 1}], {n, 15}]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Alonso del Arte, May 10 2013
STATUS
approved