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.

A387072 Index of n in A386482, or -1 if n does not appear in A386482.

Original entry on oeis.org

1, 2, 5, 3, 17, 4, 11, 9, 6, 8, 24, 7, 44, 10, 16, 14, 52, 13, 31, 15, 12, 23, 73, 22, 18, 21, 26, 20, 126, 19, 57, 29, 25, 28, 41, 27, 115, 30, 43, 40, 809, 39, 821, 38, 42, 37, 76, 36, 49, 35, 51, 34, 652, 33, 70, 48, 32, 47, 144, 46, 189, 56, 50, 55, 45, 54
Offset: 1

Views

Author

Michael De Vlieger, Aug 15 2025

Keywords

Crossrefs

Cf. A386482.

Programs

  • Mathematica
    Block[{a, j, k, p, m, s, nn},
      nn = 2^10; a[] := 0; m[] := 1; a[1] = 1; j = a[2] = 2;
      Monitor[Do[
        If[PrimePowerQ[j],
          Set[{p, k, m}, {#1, #1^(#2 - 1), #1^(#2 - 1)}] & @@
            FactorInteger[j][[1]]; While[And[a[k*p] != 0, k != 0], k--];
            If[k == 0, k = m; While[a[k*p] != 0, k++] ]; k *= p,
          k = j - 1; While[And[Or[a[k] != 0, CoprimeQ[j, k]], k != 1], k--];
          If[k == 1, k += j; While[Or[a[k] != 0, CoprimeQ[j, k] ], k++] ] ];
        Set[{a[k], j}, {n, k}], {n, 3, nn}], n];
      k = 1; Reap[While[a[k] > 0, Sow[a[k]]; k++] ][[-1, 1]] ]