%I #25 Jul 22 2024 15:34:06
%S 1,0,0,0,0,1,0,1,1,0,0,1,0,0,0,0,0,0,0,1,2,0,0,1,1,0,0,0,0,0,0,2,0,0,
%T 0,1,0,0,0,1,0,1,0,0,0,0,0,1,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,1,
%U 0,0,0,0,0,0,0,0,0,0,0,2,3,0,0,0,0,0,0,1
%N Number of divisors d of n such that (n/d)^d == d (mod (n/d + d)).
%H Antti Karttunen, <a href="/A373898/b373898.txt">Table of n, a(n) for n = 1..65537</a>
%e a(1) = 1 because the only divisor of 1 is 1 and (1/1)^1 (mod (1/1 + 1)) = 1;
%e a(6) = 1 because (6/1)^1 mod (6/1 + 1) = 6 (not equal to 1), (6/2)^2 mod (6/2 + 2) = 4 (not equal to 2), (6/3)^3 (mod (6/3 + 3) = 3 and (6/6)^6 mod (6/6 + 6) = 1 (not equal to 6), where 1, 2, 3 and 6 are divisors of 6.
%t a[n_]:=Sum[Boole[Mod[(n/d)^d,n/d+d]==d],{d,Divisors[n]}]; Array[a,100] (* _Stefano Spezia_, Jun 22 2024 *)
%o (Magma) [#[d: d in Divisors(n) | (n div d)^d mod((n div d)+d) eq d]: n in [1..100]];
%o (PARI) a(n) = sumdiv(n, d, Mod(n/d, n/d + d)^d == d); \\ _Michel Marcus_, Jun 23 2024
%Y Cf. A000005.
%K nonn
%O 1,21
%A _Juri-Stepan Gerasimov_, Jun 22 2024
|