OFFSET
0,3
COMMENTS
For n > 0, a(n) = n if and only if 2n+1 is prime.
If a(n) < n, then 2n+1 is composite.
Theorem: a(n) > n if and only if 2n+1 is an absolute Euler pseudoprime.
Conjecture: if 2n+1 is an absolute Euler pseudoprime, then a(n) = phi(2n+1).
MATHEMATICA
a[n_] := Length[Select[Range[2n], PowerMod[#, n, 2n+1] == 1 &]]; Array[a, 100] (* Amiram Eldar, May 02 2019 *)
PROG
(PARI) a(n) = sum(b=1, 2*n, Mod(b, 2*n+1)^n == 1); \\ Michel Marcus, May 02 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, May 02 2019
EXTENSIONS
More terms from Amiram Eldar, May 02 2019
STATUS
approved