login
A389781
Number of divisors d of n such that d^(n/d) == d (mod n).
3
1, 2, 2, 2, 2, 4, 2, 2, 2, 4, 2, 3, 2, 4, 4, 2, 2, 3, 2, 4, 4, 4, 2, 3, 2, 4, 2, 3, 2, 5, 2, 2, 4, 4, 4, 3, 2, 4, 4, 3, 2, 6, 2, 3, 3, 4, 2, 3, 2, 3, 4, 4, 2, 3, 4, 3, 4, 4, 2, 5, 2, 4, 3, 2, 4, 5, 2, 4, 4, 5, 2, 4, 2, 4, 3, 3, 4, 6, 2, 3, 2, 4, 2, 5, 4, 4, 4, 3, 2, 5, 4, 3, 4, 4, 4, 3
OFFSET
1,2
COMMENTS
a(n) is the number of unique pairs of coprime x,y satisfying x*y = n and y^(x - 1) == 1 (mod x). Note that x and y are symmetric in the congruence. - Aloe Poliszuk, Oct 20 2025
LINKS
FORMULA
From Aloe Poliszuk, Oct 20 2025: (Start)
a(p^e) = 2.
a(n) <= 2^(omega(n)), where omega = A001221. (End)
MATHEMATICA
a[n_]:=Module[{d=Divisors[n]}, Count[PowerMod[d, n/d, n]-Mod[d, n], 0]]; Array[a, 96] (* James C. McMahon, Oct 25 2025 *)
PROG
(Magma) [1 + #[d: d in [1..n-1] | n mod d eq 0 and Modexp(d, n div d, n) eq d]: n in [1..90]];
(PARI) a(n) = sumdiv(n, d, lift(Mod(d, n)^(n/d)) == d%n); \\ Aloe Poliszuk, Oct 20 2025
CROSSREFS
Sequence in context: A384834 A391684 A232398 * A048669 A365499 A383762
KEYWORD
nonn
AUTHOR
STATUS
approved