OFFSET
2,7
LINKS
Antti Karttunen, Table of n, a(n) for n = 2..16384
EXAMPLE
8 divides exactly three of the numbers 8^4-k^4 for k = 1, 2 , ..., 7, so that a(8) = 3.
MATHEMATICA
s[k_] := k^4;
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}] (* A206825 *)
PROG
(PARI) A206825(n) = { my(n4 = n^4); sum(k=1, n-1, !((n4-(k^4))%n)); }; \\ Antti Karttunen, Nov 17 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Feb 12 2012
STATUS
approved