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.

Showing 1-4 of 4 results.

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

A385318 Number of nonnegative s < n such that s^s == (-s)^s (mod n).

Original entry on oeis.org

1, 2, 2, 2, 3, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 8, 9, 12, 10, 10, 11, 12, 12, 12, 15, 14, 18, 14, 15, 16, 16, 16, 17, 18, 18, 18, 19, 20, 20, 20, 21, 22, 22, 22, 24, 24, 24, 24, 28, 30, 26, 26, 27, 36, 28, 28, 29, 30, 30, 30, 31, 32, 33, 32, 33, 34, 34, 34, 35
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 31 2025

Keywords

Comments

From Robert Israel, Aug 01 2025: (Start)
a(n) = ceiling(n/2) + the number of odd s < n such that 2 * s^s == 0 (mod n).
If n is divisible by 4, there are no such s, so a(n) = n/2.
If n == 2 (mod 4), then s = n/2 works, so a(n) >= n/2 + 1. (End)

Crossrefs

Programs

A385638 Number of nonnegative s < n such that (-s)^s == -s^s (mod n).

Original entry on oeis.org

1, 2, 1, 3, 2, 3, 3, 7, 5, 5, 5, 7, 6, 7, 7, 14, 8, 11, 9, 11, 10, 11, 11, 15, 14, 13, 17, 15, 14, 15, 15, 30, 16, 17, 17, 23, 18, 19, 19, 23, 20, 21, 21, 23, 23, 23, 23, 31, 27, 29, 25, 27, 26, 35, 27, 31, 28, 29, 29, 31, 30, 31, 32, 62, 32, 33, 33, 35, 34, 35, 35, 47
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 06 2025

Keywords

Comments

Every odd s < n satisfies the condition. An even s works only when n divides 2*s^s. Thus a(n) = floor(n/2) plus the even s that satisfy this test. For an odd prime p >= 3, no even s works, so a(p) = (p - 1) / 2. With 0^0 = 1, s = 0 works only for n = 1 or 2. - Robert P. P. McKone, Aug 07 2025

Crossrefs

Programs

A386557 Smallest k for which A384834(k) = n.

Original entry on oeis.org

1, 2, 10, 6, 60, 42, 210, 780, 420, 2730, 5460, 3570, 10920, 30030, 94710, 231420, 510510, 190190, 1504230, 2552550, 285285, 15120105, 1141140, 570570, 60480420, 78768690, 380570190, 577642065, 514083570
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 25 2025

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := DivisorSum[n, 1 &, PowerMod[-#, #, n] == n - # &]; With[{t = Array[f, 10^6]}, TakeWhile[FirstPosition[t, #] & /@ Range[Max[t]] // Flatten, ! MissingQ[#] &]] (* Amiram Eldar, Jul 26 2025 *)

Extensions

a(25)-a(29) from Amiram Eldar, Jul 26 2025
Showing 1-4 of 4 results.