OFFSET
2,8
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..10001
Wikipedia, Pseudoprime.
EXAMPLE
MATHEMATICA
a[n_] := Count[Range[4, n-1], _?(CompositeQ[#] && PowerMod[n, # - 1, #] == 1 &)]; Array[a, 100, 2]
PROG
(PARI) a(n) = {my(c = 0); forcomposite(k = 4, n-1, if(Mod(n, k)^(k-1) == 1, c++)); c; }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Apr 05 2024
STATUS
approved