This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A378387 #39 Jan 23 2025 12:38:50
%S A378387 0,1,1,0,1,2,1,0,1,1,1,1,1,1,2,0,1,1,1,1,2,1,1,1,1,1,1,1,1,2,1,0,2,1,
%T A378387 1,0,1,1,2,0,1,3,1,1,2,1,1,0,1,1,2,1,1,1,2,1,2,1,1,2,1,1,1,0,3,4,1,0,
%U A378387 2,4,1,1,1,1,2,1,1,2,1,0,1,1,1,0,2,1,2,0,1,2,2,1,2,1,2,1,1,1,1,0
%N A378387 a(n) is the number of proper divisors d of n such that (-d)^n == -d (mod n).
%C A378387 From _Robert Israel_, Dec 27 2024: (Start)
%C A378387 If n > 1 is odd, a(n) > 0 as d = 1 works.
%C A378387 a(n) = 1 if n is a prime power (A246655). (End)
%H A378387 Robert Israel, <a href="/A378387/b378387.txt">Table of n, a(n) for n = 1..10000</a>
%e A378387 a(4) = 0 because the proper divisors of 4 are 1, 2 and
%e A378387 (-1)^4 (mod 4) is not congruent to 3 (mod 4);
%e A378387 (-2)^4 (mod 4) is not congruent to 2 (mod 4).
%e A378387 a(5) = 1 because the only proper divisor of 5 is 1 and
%e A378387 (-1)^5 (mod 5) == 4 (mod 5).
%p A378387 f:= proc(n) nops(select((t -> (-t)&^n + t mod n = 0), numtheory:-divisors(n) minus {n})) end proc:
%p A378387 map(f, [$1..100]); # _Robert Israel_, Dec 27 2024
%t A378387 a[n_] := DivisorSum[n, 1 &, # < n && PowerMod[n - #, n, n] == n - # &]; Array[a, 100] (* _Amiram Eldar_, Dec 23 2024 *)
%o A378387 (Magma) [#[d: d in [1..n-1] | n mod d eq 0 and (-d)^n mod n eq n-d]: n in [1..100]];
%Y A378387 Cf. A032741, A371883.
%K A378387 nonn
%O A378387 1,6
%A A378387 _Juri-Stepan Gerasimov_, Dec 23 2024
%E A378387 Edited by _N. J. A. Sloane_, Jan 11 2025