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.

A379648 a(n) = position of prime(n) in A379652, or a(n) = -1 if prime(n) is not in A379652.

Original entry on oeis.org

1, 7, 2, 8, 3, 13, 11, 6, 4, 17, 9, 14, 26, 49, 5, 47, 18, 154, 29, 12, 44, 46, 27, 120, 33, 16, 102, 48, 43, 36, 10, 87, 21, 52, 41, 15, 71, 86, 28, 58, 121, 31, 114, 172, 45, 190, 89, 189, 37, 108, 150, 19, 230, 83, 247, 88, 146, 30, 103, 74, 149, 59, 55, 119
Offset: 1

Views

Author

Michael De Vlieger, Jan 01 2025

Keywords

Crossrefs

Cf. A379652.

Programs

  • Mathematica
    c[_] := True; j = 2; c[2] = False; r = 0; a[1] = PrimePi[j];
    Do[m = 2*j + 1;
      While[
        Set[k, SelectFirst[FactorInteger[m][[All, 1]], c]]; ! IntegerQ[k],
        m = 2*m + 1];
      c[k] = False; j = k; a[PrimePi[k]] = n;
      If[k > r, r = k], {n, 2, 256}];
    TakeWhile[Array[a, PrimePi[r]], IntegerQ]