login
A386930
Number of divisors d of n such that (-d)^d == -d^d (mod n).
3
1, 2, 2, 3, 2, 3, 2, 4, 3, 3, 2, 4, 2, 3, 4, 4, 2, 5, 2, 4, 4, 3, 2, 5, 3, 3, 4, 4, 2, 5, 2, 5, 4, 3, 4, 7, 2, 3, 4, 5, 2, 5, 2, 4, 6, 3, 2, 6, 3, 5, 4, 4, 2, 7, 4, 5, 4, 3, 2, 6, 2, 3, 6, 6, 4, 5, 2, 4, 4, 5, 2, 9, 2, 3, 6, 4, 4, 5, 2, 6, 5, 3, 2, 6, 4, 3, 4, 5, 2, 8, 4, 4, 4, 3, 4, 7, 2, 5, 6, 7
OFFSET
1,2
COMMENTS
All odd divisors d are included, so a(n) >= A001227(n), with equality if n is odd. On the other hand, if n > 8 is even, d=2 is not included so a(n) <= A000005(n) - 1. - Robert Israel, Sep 08 2025
LINKS
MAPLE
f:= proc(n) nops(select(d -> (-d)&^ d + d &^ d mod n = 0, numtheory:-divisors(n))) end proc;
map(f, [$1..100]); # Robert Israel, Sep 08 2025
MATHEMATICA
a[n_] := DivisorSum[n, 1 &, PowerMod[-#, #, n] == Mod[-PowerMod[#, #, n], n] &]; Array[a, 100] (* Amiram Eldar, Aug 09 2025 *)
PROG
(Magma) [1 + #[d: d in [1..n-1] | n mod d eq 0 and Modexp(-d, d, n) eq -Modexp(d, d, n) mod n]: n in [1..100]];
(PARI) a(n) = sumdiv(n, d, Mod(-d, n)^d == - Mod(d, n)^d); \\ Michel Marcus, Aug 09 2025
KEYWORD
nonn
AUTHOR
STATUS
approved