OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Jan 01 2025
STATUS
approved