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.

Previous Showing 31-32 of 32 results.

A387080 a(1)=1, a(2)=3; thereafter a(n) is either the greatest number k < a(n-1) not already used such that gcd(k, a(n-1)) > 1, or if no such k exists then a(n) is the smallest number k > a(n-1) not already used such that gcd(k, a(n-1)) > 1.

Original entry on oeis.org

1, 3, 6, 4, 2, 8, 10, 5, 15, 12, 9, 18, 16, 14, 7, 21, 24, 22, 20, 25, 30, 28, 26, 13, 39, 36, 34, 32, 38, 19, 57, 54, 52, 50, 48, 46, 44, 42, 40, 35, 45, 33, 27, 51, 17, 68, 66, 64, 62, 60, 58, 56, 49, 63, 69, 23, 92, 90, 88, 86, 84, 82, 80, 78, 76, 74, 72, 70
Offset: 1

Views

Author

Keywords

Comments

This is a variant of A386482 that begins with 1,3 instead of 1,2.

Crossrefs

Cf. A386482.

Programs

  • Mathematica
    Block[{c, j, k, m, p, r, nn},
      nn = 2^12; c[] := False; m[] := 1; j = 2; c[1] = c[2] = True; r = 1;
      {1}~Join~Monitor[Most@ Reap[Do[
        If[PrimePowerQ[j],
          Set[{p, k, m}, {#1, #1^(#2 - 1), #1^(#2 - 1)}] & @@
            FactorInteger[j][[1]]; While[And[c[k*p], k != 0], k--];
            If[k == 0, k = m; While[c[k*p], k++]]; k *= p,
          k = j - 1; While[And[Or[c[k], CoprimeQ[j, k]], k != 1], k--];
            If[k == 1, k += j; While[Or[c[k], CoprimeQ[j, k] ], k++] ] ];
        If[Mod[j, 2] == Mod[k, 2], r++, Sow[r]; r = 1];
        Set[{c[k], j}, {True, k}], {n, 3, nn}] ][[-1, 1]], n] ]

A387640 A387523(n) is the a(n)-th prime number.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Sep 04 2025

Keywords

Comments

If the conjecture in A387523 is true, then the present sequence is self-inverse.

Examples

			a(42) = A000720(A387523(42)) = A000720(173) = 40.
		

Crossrefs

Programs

  • PARI
    \\ See Links section.

Formula

a(n) = A000720(A387523(n)).
Previous Showing 31-32 of 32 results.