OFFSET
2,4
COMMENTS
For a guide to related sequences, see A206588.
If n is a prime > 3, a(n) = 2. - Robert Israel, Jun 04 2023
LINKS
Robert Israel, Table of n, a(n) for n = 2..10000
EXAMPLE
5 divides exactly two of the numbers s(n)-s(k) for k=1,2,3,4, so a(5)=2.
MAPLE
f:= n -> numboccur(S[n] mod n, S[1..n-1] mod n):
S:= [seq(k*(k+1)*(2*k+1)/6, k=1..100)]:
map(f, [$2..100]); # Robert Israel, Jun 04 2023
MATHEMATICA
s[k_] := k (k + 1) (2 k + 1)/6;
f[n_, k_] := If[Mod[s[n] - s[k], n] == 0, 1, 0];
t[n_] := Flatten[Table[f[n, k], {k, 1, n - 1}]]
a[n_] := Count[Flatten[t[n]], 1]
Table[a[n], {n, 2, 120}] (* A206827 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Feb 15 2012
STATUS
approved