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).

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 23 2025

Keywords

Comments

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

Crossrefs

Programs

  • Magma
    [1 + #[d: d in Divisors(n) | Modexp(-d,d,n) eq n-d mod n]: n in [1..100]];
    
  • Maple
    a:= n-> add(`if`(0=d+(-d)&^d mod n, 1, 0), d=numtheory[divisors](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 26 2025
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, PowerMod[-#, #, n] == n-# &]; Array[a, 100] (* Amiram Eldar, Jul 24 2025 *)
  • PARI
    a(n) = sumdiv(n, d, Mod(-d, n)^d == n-d); \\ Michel Marcus, Jul 26 2025