cp's OEIS Frontend

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.

A384834 Number of divisors of n such that (-d)^d == -d (mod n).

This page as a plain text file.
%I A384834 #29 Aug 26 2025 15:57:04
%S A384834 1,2,2,2,2,4,2,2,2,3,2,3,2,3,3,2,2,3,2,4,3,3,2,4,2,3,2,3,2,4,2,2,3,3,
%T A384834 2,3,2,3,3,3,2,6,2,3,3,3,2,2,2,3,3,4,2,3,3,3,3,3,2,5,2,3,3,2,4,5,2,3,
%U A384834 3,5,2,4,2,3,3,3,2,5,2,3,2,3,2,4,3,3,3,3,2,4,3,3,3,3,3,3,2,3,2,3
%N A384834 Number of divisors of n such that (-d)^d == -d (mod n).
%C A384834 a(n) >= 2 for n > 1, as d = 1 and n always work. a(n) = 2 if n is a prime power (A246655). - _Robert Israel_, Aug 26 2025
%H A384834 Robert Israel, <a href="/A384834/b384834.txt">Table of n, a(n) for n = 1..10000</a>
%p A384834 a:= n-> add(`if`(0=d+(-d)&^d mod n, 1, 0), d=numtheory[divisors](n)):
%p A384834 seq(a(n), n=1..100);  # _Alois P. Heinz_, Jul 26 2025
%t A384834 a[n_] := DivisorSum[n, 1 &, PowerMod[-#, #, n] == n-# &]; Array[a, 100] (* _Amiram Eldar_, Jul 24 2025 *)
%o A384834 (Magma) [1 + #[d: d in Divisors(n) | Modexp(-d,d,n) eq n-d mod n]: n in [1..100]];
%o A384834 (PARI) a(n) = sumdiv(n, d, Mod(-d, n)^d == n-d); \\ _Michel Marcus_, Jul 26 2025
%Y A384834 Cf. A000005, A386409.
%K A384834 nonn,changed
%O A384834 1,2
%A A384834 _Juri-Stepan Gerasimov_, Jul 23 2025