A337454 a(n) is the number of divisors of n such that the ratio (the number of nonnegative m < n such that m^d == m (mod n))/(the number of nonnegative m < n such that -m^d == m (mod n)) is also a divisor of n.
1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 5, 2, 4, 4, 5, 2, 6, 2, 5, 2, 4, 2, 7, 3, 4, 4, 5, 2, 8, 2, 6, 2, 4, 2, 9, 2, 4, 4, 7, 2, 6, 2, 5, 6, 4, 2, 9, 3, 6, 4, 5, 2, 8, 2, 7, 2, 4, 2, 9, 2, 4, 5, 7, 2, 6, 2, 5, 2, 6, 2, 10, 2, 4, 6, 5, 1, 8, 2, 9, 5, 4, 2, 9, 4, 4, 4, 7, 2, 12, 4, 5, 2, 4, 2, 11
Offset: 1
Keywords
Examples
a(1) = 1 solution is pair (x,y) of divisors of n = 1 is (1,1). a(2) = 2 solutions are pairs (x,y) of divisors of n = 2 are (1,1) and (2,1). a(3) = 2 solutions are pairs (x,y) of divisors of n = 3 are (1,3) and (3,3). a(4) = 3 solutions are pairs (x,y) of divisors of n = 4 are (1,2), (2,1) and (4,1).
Links
- Michel Marcus, Table of n, a(n) for n = 1..5000
Programs
-
Magma
[#[d: d in Divisors(n) | Denominator(n*#[m: m in [0..n-1] | -m^d mod n eq m]/#[m: m in [0..n-1] | m^d mod n eq m]) eq 1]: n in [1..96]];
-
PARI
a(n) = sumdiv(n, d, n % (sum(m=0, n-1, Mod(m, n)^d == m)/sum(m=0, n-1, Mod(-m, n)^d == m)) == 0); \\ Michel Marcus, Aug 30 2020
Comments