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 A384237 #26 Aug 22 2025 02:16:16 %S A384237 1,2,2,2,2,3,2,2,2,3,2,4,2,3,3,2,2,3,2,3,3,3,2,3,2,3,2,4,2,6,2,2,3,3, %T A384237 2,4,2,3,3,3,2,4,2,3,3,3,2,3,2,3,3,3,2,3,3,4,3,3,2,4,2,3,3,2,4,5,2,3, %U A384237 3,3,2,3,2,3,3,3,2,4,2,4,2,3,2,6,3,3,3,3,2,5,3,3,3,3,3,2,2,3,2,3 %N A384237 The number of divisors d of n such that d^d == d (mod n). %F A384237 a(n) = 1 + number of proper divisors d of n such that d^(d-1) == 1 (mod n/d). - _Chai Wah Wu_, May 29 2025 %e A384237 a(2) = 2 because 1^1 = 1 (mod 2) and 2^2 = 2 == 0 (mod 2) where 1 and 2 are divisors of 2. %t A384237 a[n_]:=1+Length[Select[Divisors[n],PowerMod[#,#,n]==# &]]; Array[a,100] (* _Stefano Spezia_, May 25 2025 *) %o A384237 (Magma) [1 + #[d: d in Divisors(n) | Modexp(d, d, n) eq d]: n in [1..100]]; %o A384237 (PARI) a(n) = sumdiv(n, d, Mod(d,n)^d == d); \\ _Michel Marcus_, May 25 2025 %o A384237 (Python) %o A384237 from sympy import divisors %o A384237 def A384237(n): return 1+sum(1 for d in divisors(n,generator=True) if d<n and pow(d,d-1,n//d)==1) # _Chai Wah Wu_, May 29 2025 %Y A384237 Cf. A000005, A027750. %K A384237 nonn,changed %O A384237 1,2 %A A384237 _Juri-Stepan Gerasimov_, May 22 2025