A121380 Sums of primitive roots for n (or 0 if n has no primitive roots).
0, 1, 2, 3, 5, 5, 8, 0, 7, 10, 23, 0, 26, 8, 0, 0, 68, 16, 57, 0, 0, 56, 139, 0, 100, 52, 75, 0, 174, 0, 123, 0, 0, 136, 0, 0, 222, 114, 0, 0, 328, 0, 257, 0, 0, 208, 612, 0, 300, 200, 0, 0, 636, 156, 0, 0, 0, 348, 886, 0, 488, 216, 0, 0, 0, 0, 669, 0, 0, 0
Offset: 1
Examples
The primitive roots of 13 are 2, 6, 7, 11. Their sum is 26, or 0 (mod 13). By Gauss, 13-1=12 is thus divisible by a square number.
References
- J. C. F. Gauss, Disquisitiones Arithmeticae, 1801.
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- Eric Weisstein, Primitive Roots.
Programs
-
Mathematica
primitiveRoots[n_] := If[n == 1, {}, If[n == 2, {1}, Select[Range[2, n-1], MultiplicativeOrder[#, n] == EulerPhi[n] &]]]; Table[Total[primitiveRoots[n]], {n,100}] (* From version 10 up: *) Table[Total @ PrimitiveRootList[n], {n, 1, 100}] (* Jean-François Alcover, Oct 31 2016 *)
Comments