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.

User: Juri-Stepan Gerasimov

Juri-Stepan Gerasimov's wiki page.

Juri-Stepan Gerasimov has authored 2108 sequences. Here are the ten most recent ones:

A386310 Number of divisors d of n such that 2*d^d == 0 (mod n).

Original entry on oeis.org

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

Author

Juri-Stepan Gerasimov, Aug 20 2025

Keywords

Crossrefs

Programs

  • Magma
    [1 + #[d: d in [1..n-1] | n mod d eq 0 and Modexp(d,d,n) eq -Modexp(d,d,n) mod n]: n in [1..100]];
    
  • Mathematica
    Table[Length[Select[Divisors[n], PowerMod[#, #, n] == Mod[n - PowerMod[#, #, n], n] &]], {n, 1, 100}] (* Vaclav Kotesovec, Aug 23 2025 *)
  • PARI
    a(n) = sumdiv(n, d, 2*Mod(d, n)^d == 0); \\ Michel Marcus, Aug 30 2025

A386284 Smallest k for which A386930(k) = n.

Original entry on oeis.org

1, 2, 4, 8, 18, 45, 36, 90, 72, 108, 144, 315, 216, 540, 576, 432, 648, 1350, 864, 2160, 1296, 1728, 4050, 2700, 2592, 3888, 6912, 11340, 5184, 5400, 7776, 10395, 10368, 13500, 20790, 10800, 23328, 24300, 16200, 31185, 31104, 21600, 27000, 40500, 62208, 56700
Offset: 1

Author

Juri-Stepan Gerasimov, Aug 14 2025

Keywords

Crossrefs

Programs

  • Mathematica
    a386930[n_] := DivisorSum[n, 1 &, PowerMod[-#, #, n] == Mod[-PowerMod[#, #, n], n] &];a[n_]:=Module[{k=0},Until[a386930[k]==n,k++];k];Array[a,46] (* James C. McMahon, Aug 21 2025 *)

A386872 Smallest k for which A385662(k) = n, or -1 if no such k exists.

Original entry on oeis.org

1, 2, 6, 12, 18, 24, 54, 48, 72, 96, 270, 120, 450, 384, 288, 240, 2310, 360, 1890, 480, 1152, 3150, 4050, 720, 2592, 6930, 1800, 1920, 17010, 1440
Offset: 1

Author

Juri-Stepan Gerasimov, Aug 06 2025

Keywords

Crossrefs

Programs

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

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

Original entry on oeis.org

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

Author

Juri-Stepan Gerasimov, Aug 08 2025

Keywords

Programs

  • Magma
    [1 + #[d: d in [1..n-1] | n mod d eq 0 and Modexp(-d,d,n) eq -Modexp(d,d,n) mod n]: n in [1..100]];
    
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, PowerMod[-#, #, n] == Mod[-PowerMod[#, #, n], n] &]; Array[a, 100] (* Amiram Eldar, Aug 09 2025 *)
  • PARI
    a(n) = sumdiv(n, d, Mod(-d, n)^d == - Mod(d, n)^d); \\ Michel Marcus, Aug 09 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

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

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

Original entry on oeis.org

1, 2, 1, 2, 1, 3, 1, 3, 2, 3, 1, 4, 1, 3, 1, 4, 1, 5, 1, 4, 1, 3, 1, 6, 2, 3, 3, 4, 1, 5, 1, 5, 1, 3, 1, 6, 1, 3, 1, 6, 1, 5, 1, 4, 2, 3, 1, 8, 2, 5, 1, 4, 1, 7, 1, 6, 1, 3, 1, 8, 1, 3, 2, 6, 1, 5, 1, 4, 1, 5, 1, 9, 1, 3, 2, 4, 1, 5, 1, 8, 3, 3, 1, 8, 1, 3, 1, 6, 1, 8, 1, 4, 1, 3, 1, 10, 1, 5, 2, 6
Offset: 1

Author

Juri-Stepan Gerasimov, Aug 03 2025

Keywords

Comments

From Robert Israel, Aug 04 2025: (Start)
If n is divisible by 4, a(n) = A000005(n/2).
If n is odd, a(n) is the number of divisors d of n such that n divides d^d.
If n = 2 * m with m odd, a(n) = A000005(m) + a(m). (End)

Programs

  • Magma
    [1 + #[d: d in [1..n-1] | n mod d eq 0 and Modexp(d,d,n) eq Modexp(-d,d,n)]: n in [1..100]];
    
  • Maple
    f:= proc(n) if n::odd then nops(select(d -> d &^ d mod n = 0, numtheory:-divisors(n)))
           elif n mod 4 = 0 then numtheory:-tau(n/2)
           else numtheory:-tau(n/2) + procname(n/2) fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Aug 04 2025
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, PowerMod[#, #, n] == PowerMod[-#, #, n] &]; Array[a, 100] (* Amiram Eldar, Aug 04 2025 *)
  • PARI
    a(n) = sumdiv(n, d, Mod(d, n)^d == Mod(-d, n)^d); \\ Michel Marcus, Aug 04 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

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

A386436 Smallest k for which A385731(k) = n.

Original entry on oeis.org

1, 2, 6, 42, 1770, 47058, 547470, 8648458, 623254170
Offset: 1

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{k=0},Until[Length[Select[Divisors[k], Mod[-#, k]==PowerMod[-#, #, k]==PowerMod[#, #, k]&]]==n,k++];k];Array[a,7] (* James C. McMahon, Aug 06 2025 *)

Extensions

a(9) from Michel Marcus, Jul 21 2025

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

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

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

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