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.

A379649 a(0) = 1, a(n) = position of prime(n) in A379727, or a(n) = -1 if prime(n) is not in A379727.

Original entry on oeis.org

1, -1, 2, 4, 3, 5, 9, 15, 8, 6, 13, 44, 10, 17, 40, 7, 38, 14, 134, 20, 16, 35, 37, 18, 46, 24, 12, 153, 39, 34, 27, 45, 71, 104, 43, 32, 11, 95, 70, 19, 82, 47, 22, 165, 98, 36, 179, 73, 178, 28, 159, 130, 554, 365, 67, 220, 72, 124, 21, 154, 58, 127, 83, 79
Offset: 0

Views

Author

Michael De Vlieger, Jan 01 2025

Keywords

Comments

a(0) = 1 by definition to signify A379727(1) = 1.

Crossrefs

Cf. A379727.

Programs

  • Mathematica
    c[_] := True; j = 1; c[1] = False; r = 0; a[0] = 1;
    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, 600}];
    {1, -1}~Join~TakeWhile[Array[a, PrimePi[r] + 1, 2], IntegerQ]