OFFSET
1,2
COMMENTS
a(n) is the number of nonnegative bases c < n such that c^n + c == 0 (mod n).
a(2^k) = 2 for k > 0.
a(p^m) = 1 for odd prime p with m >= 0.
Let fy(n) = (the number of values b in Z/nZ such that b^y = b)/(the number of values c in Z/nZ such that -c^y = c) for nonnegative y, then:
f0(n) = A000012(n),
f1(n) = A026741(n),
f2(n) = A000012(n),
1 <= f3(n) <= n,
f4(n) = A000012(n), ...,
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
a(n) = A182816(n)/r for some odd r.
PROG
(Magma) [#[c: c in [0..n-1] | -c^n mod n eq c]: n in [1..95]];
(PARI) a(n) = sum(c=1, n, Mod(c, n)^n == -c); \\ Michel Marcus, Mar 27 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Mar 27 2020
STATUS
approved