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 A385731 #20 Jul 21 2025 22:03:27 %S A385731 1,2,1,1,1,3,1,1,1,2,1,1,1,2,1,1,1,2,1,2,1,2,1,2,1,2,1,1,1,2,1,1,1,2, %T A385731 1,1,1,2,1,1,1,4,1,1,1,2,1,1,1,2,1,2,1,2,1,1,1,2,1,2,1,2,1,1,1,3,1,1, %U A385731 1,4,1,2,1,2,1,1,1,3,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,2,1,2,1,1 %N A385731 Number of divisors d of n such that (-d) == (-d)^d == d^d (mod n). %t A385731 a[n_]:=Length[Select[Divisors[n],Mod[-#,n]==PowerMod[-#,#,n]==PowerMod[#,#,n]&]];Array[a,100] (* _James C. McMahon_, Jul 21 2025 *) %o A385731 (Magma) [#[d: d in Divisors(n) | Modexp(d, d, n) eq n-d and Modexp(-d, d, n) eq n-d]: n in [1..100]]; %o A385731 (PARI) a(n) = sumdiv(n, d, (-d == Mod(d, n)^d) && (-d == Mod(-d, n)^d)); \\ _Michel Marcus_, Jul 09 2025 %Y A385731 Cf. A000005, A384237, A384854, A385392, A385540, A385729. %K A385731 nonn %O A385731 1,2 %A A385731 _Juri-Stepan Gerasimov_, Jul 08 2025