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: Rémy Sigrist

Rémy Sigrist's wiki page.

Rémy Sigrist has authored 2674 sequences. Here are the ten most recent ones:

A387542 a(n) is the distance from the n-th term of A386482 to the nearest term of A386482 coprime to it.

Original entry on oeis.org

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

Author

Rémy Sigrist, Sep 01 2025

Keywords

Comments

In other words: a(n) is the least d >= 0 such that gcd(A386482(n), A386482(n - d)) = 1 or gcd(A386482(n), A386482(n + d)) = 1.
The sequence is well defined as A386482(1) = 1 is coprime to all terms of A386482.

Examples

			For n = 7: the GCD of A386482(7) = 12 and its neighboring terms are:
  d   A387542(7+d)  gcd(A387542(7), A387542(7+d))
  --  ------------  -----------------------------
  -4             4                              4
  -3             6                              6
  -2             3                              3
  -1             9                              3
   0            12                             12
   1            10                              2
   2             8                              4
   3            14                              2
   4             7                              1
The nearest coprime term, A387542(11) = 7, is at distance 4, so a(7) = 4.
		

Crossrefs

Cf. A386482.

Programs

  • PARI
    \\ See Links section.

A387544 Even terms of A386482, halved, in order of occurrence.

Original entry on oeis.org

1, 2, 3, 6, 5, 4, 7, 9, 8, 10, 15, 14, 13, 12, 11, 18, 17, 16, 19, 27, 26, 25, 24, 23, 22, 21, 20, 30, 29, 28, 34, 33, 32, 31, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 46, 47, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50
Offset: 1

Author

Rémy Sigrist, Sep 01 2025

Keywords

Comments

Each record in the sequence is followed by the smaller missing terms in descending order.

Examples

			The first terms, alongside the first terms of A386482, are:
  k   A386482(k)  n   a(n)
  --  ----------  --  ----
   1           1
   2           2   1     1
   3           4   2     2
   4           6   3     3
   5           3
   6           9
   7          12   4     6
   8          10   5     5
   9           8   6     4
  10          14   7     7
  11           7
  12          21
  13          18   8     9
  14          16   9     8
  15          20  10    10
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

a(a(n)) = n.

A387558 Numbers k such that A386482(k) is even.

Original entry on oeis.org

2, 3, 4, 7, 8, 9, 10, 13, 14, 15, 19, 20, 21, 22, 23, 27, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 40, 46, 47, 48, 53, 54, 55, 56, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 74, 75, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97
Offset: 1

Author

Rémy Sigrist, Sep 02 2025

Keywords

Examples

			A386482(46) = 60 is even, so 46 belongs to the sequence.
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

A387544(n) = A386482(a(n)) / 2.

A387094 An infinite variant of the EKG sequence (A064413) such that for any n > 0, a(2*n) > a(2*n-1) and a(2*n) > a(2*n+1).

Original entry on oeis.org

1, 4, 2, 6, 3, 12, 8, 10, 5, 15, 9, 18, 14, 20, 16, 22, 11, 33, 21, 27, 24, 26, 13, 39, 30, 32, 28, 34, 17, 51, 36, 38, 19, 57, 42, 44, 40, 45, 25, 35, 7, 56, 46, 50, 48, 54, 52, 58, 29, 87, 60, 62, 31, 93, 63, 66, 55, 70, 49, 84, 64, 72, 68, 74, 37, 111, 69
Offset: 1

Author

Rémy Sigrist, Aug 16 2025

Keywords

Comments

For the sequence to be infinite, when computing a term with even index, say a(2*n) for some n > 1, we must ensure that some missing value v < a(2*n) such that gcd(a(2*n), v) != 1 exists.
Will every integer appear in the sequence?

Examples

			Sequence begins:
  n   a(n)
  --  ----
   1     1
   2     4
   3     2
   4     6
   5     3
   6    12
   7     8
   8    10
   9     5
  10    15
  11     9
  12    18
  13    14
  14    20
  15    16
  16    22
  17    11
		

Crossrefs

Cf. A064413.

Programs

  • PARI
    \\ See Links section.

A387059 Inverse permutation to A387058.

Original entry on oeis.org

0, 1, 2, 4, 6, 7, 5, 3, 8, 10, 11, 13, 15, 16, 14, 12, 17, 9, 18, 20, 22, 24, 26, 28, 30, 31, 29, 27, 25, 23, 21, 19, 32, 34, 36, 38, 40, 41, 43, 45, 47, 48, 46, 44, 42, 49, 39, 37, 35, 33, 51, 53, 55, 57, 59, 50, 61, 63, 65, 67, 69, 70, 68, 66, 64, 62, 71, 60
Offset: 0

Author

Rémy Sigrist, Aug 15 2025

Keywords

Examples

			A387058(42) = 44, so a(44) = 42.
		

Crossrefs

Cf. A387058.

Programs

  • PARI
    \\ See Links section.

A387058 Lexicographically earliest sequence of distinct nonnegative integers such that each term is a square number or belongs to a run of two consecutive terms summing to a square number.

Original entry on oeis.org

0, 1, 2, 7, 3, 6, 4, 5, 8, 17, 9, 10, 15, 11, 14, 12, 13, 16, 18, 31, 19, 30, 20, 29, 21, 28, 22, 27, 23, 26, 24, 25, 32, 49, 33, 48, 34, 47, 35, 46, 36, 37, 44, 38, 43, 39, 42, 40, 41, 45, 55, 50, 71, 51, 70, 52, 69, 53, 68, 54, 67, 56, 65, 57, 64, 58, 63, 59
Offset: 0

Author

Rémy Sigrist, Aug 15 2025

Keywords

Comments

This sequence is a permutation of the nonnegative as each term belongs to a run of one or two terms summing to a square number, and after such a run we can extend the sequence with the least missing value.

Examples

			The first terms and corresponding square numbers are:
  n   a(n)  Squares
  --  ----  -----------------------------
   0     0  a(0) = 0^2
   1     1  a(0) + a(1) = 1^2, a(1) = 1^2
   2     2  a(2) + a(3) = 3^2
   3     7  a(2) + a(3) = 3^2
   4     3  a(4) + a(5) = 3^2
   5     6  a(4) + a(5) = 3^2
   6     4  a(6) = 2^2, a(6) + a(7) = 3^2
   7     5  a(6) + a(7) = 3^2
   8     8  a(8) + a(9) = 5^2
   9    17  a(8) + a(9) = 5^2
  10     9  a(10) = 3^2
  11    10  a(11) + a(12) = 5^2
  12    15  a(11) + a(12) = 5^2
  13    11  a(13) + a(14) = 5^2
  14    14  a(13) + a(14) = 5^2
  15    12  a(15) + a(16) = 5^2
  16    13  a(15) + a(16) = 5^2
  17    16  a(17) = 4^2
		

Crossrefs

Cf. A034175, A387059 (inverse).

Programs

  • PARI
    \\ See Links section.

A387025 Start with the list of positive integers L_1 = (1, 2, ...); for n = 1, 2, ..., let m be the least integer > n such that L_n(n) divides L_n(m); L_{n+1}(k) = L_n(k) for any k <> m, L_{n+1}(m) = L_n(m)/L_n(n); a(n) = L_n(n).

Original entry on oeis.org

1, 2, 3, 2, 5, 1, 7, 8, 9, 2, 11, 6, 13, 2, 15, 1, 17, 2, 19, 10, 21, 2, 23, 2, 25, 1, 27, 28, 29, 2, 31, 16, 33, 2, 35, 18, 37, 2, 39, 2, 41, 1, 43, 44, 45, 2, 47, 3, 49, 1, 17, 52, 53, 2, 55, 1, 57, 2, 59, 30, 61, 2, 63, 32, 65, 2, 67, 2, 69, 1, 71, 4, 73, 2
Offset: 1

Author

Rémy Sigrist, Aug 13 2025

Keywords

Comments

Applying the same procedure to the powers of two yields A060546.
Applying the same procedure to the factorial numbers yields A006882.

Examples

			The first terms are:
  n   a(n)  L_n
  --  ----  ------------------------------------------------------
   1     1  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ...
   2     2  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ...
   3     3  1, 2, 3, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ...
   4     2  1, 2, 3, 2, 5, 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, ...
   5     5  1, 2, 3, 2, 5, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, ...
   6     1  1, 2, 3, 2, 5, 1, 7, 8, 9,  2, 11, 12, 13, 14, 15, ...
   7     7  1, 2, 3, 2, 5, 1, 7, 8, 9,  2, 11, 12, 13, 14, 15, ...
   8     8  1, 2, 3, 2, 5, 1, 7, 8, 9,  2, 11, 12, 13,  2, 15, ...
   9     9  1, 2, 3, 2, 5, 1, 7, 8, 9,  2, 11, 12, 13,  2, 15, ...
  10     2  1, 2, 3, 2, 5, 1, 7, 8, 9,  2, 11, 12, 13,  2, 15, ...
  11    11  1, 2, 3, 2, 5, 1, 7, 8, 9,  2, 11,  6, 13,  2, 15, ...
  12     6  1, 2, 3, 2, 5, 1, 7, 8, 9,  2, 11,  6, 13,  2, 15, ...
  13    13  1, 2, 3, 2, 5, 1, 7, 8, 9,  2, 11,  6, 13,  2, 15, ...
  14     2  1, 2, 3, 2, 5, 1, 7, 8, 9,  2, 11,  6, 13,  2, 15, ...
  15    15  1, 2, 3, 2, 5, 1, 7, 8, 9,  2, 11,  6, 13,  2, 15, ...
		

Crossrefs

Programs

  • PARI
    { for (n = 1, #a = vector(74, n, n), print1 (a[n]", "); forstep (k = ceil((n+1)/a[n])*a[n], #a, a[n], if (a[k] % a[n]==0, a[k] /= a[n]; break;););); }

Formula

a(p) = p for any prime number p.
a(2*p) = 1 or 2 for any prime number p.

A387104 Split A386482 into maximal runs of consecutive decreasing terms; a(n) is the length of the n-th run.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 2, 3, 3, 1, 6, 2, 3, 2, 10, 3, 5, 3, 5, 13, 3, 1, 2, 25, 2, 1, 3, 1, 1, 6, 7, 1, 3, 12, 4, 2, 33, 1, 1, 10, 6, 1, 11, 29, 51, 23, 10, 48, 61, 24, 26, 168, 1, 2, 2, 9, 1, 3, 2, 7, 2, 2, 6, 104, 15, 2, 1, 1, 2, 3, 3, 1, 1, 4, 11, 5, 159, 9, 1
Offset: 1

Author

Rémy Sigrist, Aug 16 2025

Keywords

Examples

			The first terms, alongside the corresponding runs, are:
  n   a(n)  Corresponding run
  --  ----  --------------------------------------
   1     1  1
   2     1  2
   3     1  4
   4     2  6, 3
   5     1  9
   6     3  12, 10, 8
   7     2  14, 7
   8     3  21, 18, 16
   9     3  20, 15, 5
  10     1  25
  11     6  30, 28, 26, 24, 22, 11
  12     2  33, 27
  13     3  36, 34, 32
  14     2  38, 19
  15    10  57, 54, 52, 50, 48, 46, 44, 42, 40, 35
  16     3  45, 39, 13
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

A387103(1 + Sum_{k = 1..n} a(k)) = 0 for any n > 0.

A387103 For any n >= 2, a(n) is the number of positive values k < A386482(n-1) missing from the first n-1 terms of A386482 such that gcd(k, A386482(n-1)) != 1.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 2, 2, 0, 1, 0, 2, 2, 0, 2, 1, 0, 0, 5, 3, 3, 1, 1, 0, 1, 0, 2, 2, 0, 1, 0, 6, 10, 8, 7, 6, 4, 2, 3, 1, 0, 1, 1, 0, 2, 4, 2, 1, 0, 1, 1, 0, 3, 3, 1, 1, 0, 8, 16, 11, 9, 11, 7, 7, 6, 3, 3, 2, 1, 0, 1, 1, 0, 0, 1, 0, 17, 31, 22, 20, 28, 24, 16
Offset: 2

Author

Rémy Sigrist, Aug 16 2025

Keywords

Comments

This sequence gives essentially the number of candidates for A386482(n) that are less than A386482(n-1).

Examples

			The first terms, alongside A386482(n) and the corresponding k's, are:
  n   a(n)  A386482(n)  Candidates
  --  ----  ----------  --------------------
   1  N/A            1  N/A
   2     0           2  {}
   3     0           4  {}
   4     0           6  {}
   5     1           3  {3}
   6     0           9  {}
   7     0          12  {}
   8     2          10  {8, 10}
   9     2           8  {5, 8}
  10     0          14  {}
  11     1           7  {7}
  12     0          21  {}
  13     2          18  {15, 18}
  14     2          16  {15, 16}
  15     0          20  {}
  16     2          15  {5, 15}
  17     1           5  {5}
  18     0          25  {}
  19     0          30  {}
  20     5          28  {22, 24, 26, 27, 28}
		

Crossrefs

Cf. A386482.

Programs

  • PARI
    \\ See Links section.

Formula

a(n) = 0 iff A386482(n) > A386482(n-1).

A387087 GCD of pairs of consecutive terms of the sequence A386482.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 2, 2, 2, 7, 7, 3, 2, 4, 5, 5, 5, 5, 2, 2, 2, 2, 11, 11, 3, 9, 2, 2, 2, 19, 19, 3, 2, 2, 2, 2, 2, 2, 2, 5, 5, 3, 13, 13, 5, 2, 2, 7, 7, 3, 17, 17, 2, 2, 2, 31, 31, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 3, 23, 23, 2, 47, 47, 3, 2, 2, 2, 2, 2
Offset: 1

Author

Rémy Sigrist, Aug 16 2025

Keywords

Examples

			The first terms, alongside the first terms of A386482, are:
  n   a(n)  A386482(n)
  --  ----  ----------
   1     1           1
   2     2           2
   3     2           4
   4     3           6
   5     3           3
   6     3           9
   7     2          12
   8     2          10
   9     2           8
  10     7          14
  11     7           7
  12     3          21
  13     2          18
  14     4          16
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

a(n) = gcd(A386482(n), A386482(n+1)).