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-10 of 10 results.

A384854 The number of divisors d of n such that (-d)^d == d (mod n).

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 5, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 10 2025

Keywords

Crossrefs

Programs

  • Magma
    [1+#[s: s in [1..n-1] | n mod s eq 0 and Modexp((-s), s, n) eq s]: n in [1..100]];
    
  • Maple
    a:= n-> add(`if`((-d)&^d-d mod n=0, 1, 0), d=numtheory[divisors](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 10 2025
  • PARI
    a(n) = sumdiv(n, d, Mod(-d, n)^d == d); \\ Michel Marcus, Jun 11 2025

Formula

a(n) = 1 + number of proper divisors h of n such that (-h)^h = h (mod n).

A385392 The number of divisors d of n such that -(d^d) == d (mod n).

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Jun 27 2025

Keywords

Crossrefs

Programs

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

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

Original entry on oeis.org

1, 1, 0, 0, 0, 2, 1, 0, 1, 2, 0, 1, 0, 3, 2, 0, 0, 4, 0, 1, 2, 3, 1, 1, 2, 4, 1, 3, 0, 4, 1, 0, 3, 2, 1, 3, 1, 3, 2, 1, 1, 6, 0, 3, 4, 3, 1, 1, 3, 6, 2, 2, 0, 4, 3, 2, 1, 3, 0, 3, 1, 3, 7, 0, 3, 6, 0, 1, 3, 6, 1, 3, 1, 4, 5, 3, 4, 6, 1, 1, 4, 3, 0, 5, 0, 4, 4, 2, 1, 8, 4, 2, 3, 3, 2, 1, 0, 8, 5, 5
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 02 2025

Keywords

Crossrefs

Programs

A385103 Number of values of s, 0 < s < n, such that -(s^s) == s (mod n).

Original entry on oeis.org

0, 1, 1, 0, 2, 2, 1, 0, 1, 4, 2, 1, 4, 3, 2, 0, 1, 2, 2, 1, 3, 3, 1, 1, 2, 6, 1, 1, 3, 6, 1, 0, 2, 2, 5, 1, 4, 3, 3, 1, 1, 4, 3, 1, 2, 3, 1, 1, 1, 4, 1, 2, 4, 2, 3, 2, 3, 5, 2, 3, 4, 3, 1, 0, 5, 5, 2, 1, 2, 8, 3, 1, 3, 8, 3, 1, 3, 4, 2, 1, 1, 3, 2, 3, 5, 4, 3, 1, 4, 6, 5, 2, 3, 3, 2, 1, 5, 2, 3, 1
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 17 2025

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> add(`if`(s&^s+s mod n=0, 1, 0), s=1..n-1):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 20 2025
  • PARI
    a(n) = sum(s=1, n-1, -Mod(s, n)^s == s); \\ Michel Marcus, Jun 19 2025

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

Original entry on oeis.org

1, 1, 1, 0, 1, 2, 1, 0, 1, 2, 2, 1, 3, 3, 1, 0, 1, 2, 2, 1, 3, 3, 1, 1, 1, 4, 1, 1, 2, 4, 1, 0, 2, 2, 4, 1, 2, 3, 3, 1, 1, 4, 3, 1, 1, 3, 1, 1, 1, 2, 1, 2, 2, 2, 3, 2, 3, 3, 2, 3, 2, 3, 1, 0, 3, 5, 2, 1, 2, 6, 3, 1, 1, 4, 3, 1, 3, 4, 2, 1, 1, 3, 2, 3, 3, 4, 1, 1, 1, 4, 4, 2, 3, 3, 2, 1, 1, 2, 3, 1
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 08 2025

Keywords

Crossrefs

Programs

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

Original entry on oeis.org

1, 1, 2, 2, 2, 4, 2, 4, 3, 4, 3, 7, 5, 5, 6, 6, 4, 6, 4, 9, 8, 5, 2, 13, 4, 8, 3, 9, 4, 14, 3, 6, 7, 8, 12, 11, 3, 7, 10, 17, 5, 16, 6, 9, 10, 5, 2, 19, 7, 8, 10, 13, 3, 6, 11, 18, 11, 7, 3, 27, 5, 7, 14, 10, 16, 17, 5, 13, 7, 21, 4, 21, 5, 6, 14, 12, 12, 21, 5, 27, 6, 11, 3, 29, 16, 10, 9, 19, 4, 23
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 20 2025

Keywords

Crossrefs

Programs

Extensions

a(1) corrected by Andrew Howroyd, Aug 22 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

A385100 a(n) is the smallest integer k such that A384854(k) = n.

Original entry on oeis.org

1, 2, 66, 182, 30, 858, 4830, 201630, 1829030, 976430, 24877650, 645314670, 3392218830, 17041181430
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    f(n) = sumdiv(n, d, Mod(-d, n)^d == d); \\ A384854
    a(n) = my(k=1); while(f(k) != n, k++); k; \\ Michel Marcus, Jun 18 2025

Extensions

a(8)-a(11) from Michel Marcus, Jun 18 2025
a(12)-a(14) from Jinyuan Wang, Jul 01 2025

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

A385499 a(n) is the smallest integer k such that A385392(k) = n.

Original entry on oeis.org

1, 2, 6, 42, 70, 870, 44070, 547470, 15410670, 168638470
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 30 2025

Keywords

Crossrefs

Programs

  • Mathematica
    s[n_] := DivisorSum[n, 1 &, PowerMod[#, #, n] == n - # &]; With[{v = Array[s, 45000]}, TakeWhile[Flatten[FirstPosition[v, #] & /@ Range[Max[v]]], NumberQ]] (* Amiram Eldar, Jul 03 2025 *)

Extensions

a(8)-a(10) from Amiram Eldar, Jul 03 2025
Showing 1-10 of 10 results.