OFFSET
1,5
MAPLE
a:= proc(n) uses numtheory; `if`(n=1, 0, (p->
p-add(`if`(order(i, n)=p, 1, 0), i=0..n-1))(phi(n)))
end:
seq(a(n), n=1..70); # Alois P. Heinz, Jun 22 2021
MATHEMATICA
a[n_] := (e = EulerPhi[n]) - If[n == 1 || IntegerQ @ PrimitiveRoot[n], EulerPhi[e], 0]; Array[a, 100] (* Amiram Eldar, Jun 23 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Hutchins, Jun 22 2021
STATUS
approved