login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A379648
a(n) = position of prime(n) in A379652, or a(n) = -1 if prime(n) is not in A379652.
4
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,2
LINKS
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]
CROSSREFS
Cf. A379652.
Sequence in context: A201322 A093753 A249506 * A199046 A198564 A259072
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Jan 01 2025
STATUS
approved