OFFSET
1,3
COMMENTS
Conjecture: For each natural number n, either there is a divisor k of the form (the number of nonnegative bases m < n such that m^k == m (mod n))/(the number of nonnegative bases m < n such that -m^k == m (mod n)) and it is unique, or it does not exist.
This has been checked up to at least 10^3.
PROG
(Magma) [1] cat [&*[d: d in Divisors(n)]/&*[k: k in [1..n] | not #[m: m in [0..n-1] | m^k mod n eq m]/#[m: m in [0..n-1] | -m^k mod n eq m] eq k and n mod k eq 0] - 1 + #[k: k in [1..n] | #[m: m in [0..n-1] | m^k mod n eq m]/#[m: m in [0..n-1] | -m^k mod n eq m] eq k and n mod k eq 0]: n in [2..90]];
(PARI) a(n) = {fordiv(n, d, if (d == sum(m=0, n-1, Mod(m, n)^d == m)/sum(m=0, n-1, Mod(-m, n)^d == m), return (d)); ); } \\ Michel Marcus, Aug 20 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jul 26 2020
STATUS
approved