OFFSET
1,2
COMMENTS
For all n, the divisors counted in a(n) include 1 and n.
EXAMPLE
a(8) = 3 because the divisors of 8 are 1, 2, 4 and 8, and
1^(8/1) == 1 (mod (1 + 8/1)),
4^(8/4) == 4 (mod (4 + 8/4)) and
8^(8/8) == 8 (mod (8 + 8/8)), but
2^(8/2) != 2 (mod (2 + 8/2)).
MATHEMATICA
a[n_]:=Sum[Boole[Mod[d^(n/d), n/d+d]==d], {d, Divisors[n]}]; Array[a, 90] (* Stefano Spezia, Jun 30 2024 *)
PROG
(Magma) [#[d: d in Divisors(n) | d^(n div d) mod ((n div d)+d) eq d]: n in [1..90]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jun 29 2024
STATUS
approved