[go: up one dir, main page]

login
A336597
a(n) is the least number 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)) dividing n, or 0 if no such k exists.
0
1, 1, 3, 0, 5, 3, 7, 0, 3, 5, 11, 0, 13, 7, 3, 0, 17, 3, 19, 0, 0, 11, 23, 0, 5, 13, 3, 0, 29, 3, 31, 0, 0, 17, 7, 9, 37, 19, 3, 0, 41, 0, 43, 0, 3, 23, 47, 0, 7, 5, 3, 0, 53, 3, 11, 0, 0, 29, 59, 0, 61, 31, 9, 0, 0, 0, 67, 0, 0, 7, 71, 0, 73, 37, 3, 0, 0, 3, 79, 0, 3, 41, 83, 0, 5, 43, 3, 0, 89, 3
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
Supersequence of A065091 and A002997. Cf. A334006.
Sequence in context: A322937 A326989 A326937 * A076109 A078788 A284599
KEYWORD
nonn
AUTHOR
STATUS
approved