A201560 a(n) = (Sum(m^(n-1), m=1..n-1) + 1) modulo n.
0, 0, 0, 1, 0, 4, 0, 1, 7, 6, 0, 1, 0, 8, 11, 1, 0, 10, 0, 1, 15, 12, 0, 1, 21, 14, 19, 1, 0, 16, 0, 1, 23, 18, 1, 1, 0, 20, 27, 1, 0, 22, 0, 1, 22, 24, 0, 1, 43, 26, 35, 1, 0, 28, 1, 1, 39, 30, 0, 1, 0, 32, 43, 1, 53, 34, 0, 1, 47, 36, 0, 1, 0, 38, 51, 1, 1
Offset: 1
Keywords
Examples
Sum(m^3, m=1..3) + 1 = 1^3 + 2^3 + 3^3 + 1 = 37 == 1 (mod 4), so a(4) = 1.
References
- R. K. Guy, Unsolved Problems in Number Theory, A17.
Links
- Ivan Neretin, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Table[Mod[Plus @@ PowerMod[Range[n - 1], n - 1, n] + 1, n], {n, 77}] (* Ivan Neretin, Sep 23 2016 *)
Formula
a(prime) = 0 and a(4n) = 1.
a(n) == A204187(n) + 1 (mod n).
Comments