A118663 Index of the least prime dividing the n-th composite number: A000720(A020639(A002808(n))).
1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1, 2, 1, 1, 4, 1, 2, 1, 1, 3, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1, 2, 1, 4, 1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 4, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 3, 1, 2, 1, 4, 1, 5, 1, 2, 1, 3, 1, 1, 2, 1, 1, 4, 1, 2, 1, 1, 1, 2
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A056608.
Programs
-
Mathematica
PrimePi[FactorInteger[#][[1,1]]]&/@Select[Range[200],CompositeQ] (* Harvey P. Dale, May 13 2023 *)
-
PARI
for(i=2,999,isprime(i)||print1(primepi(factor(i)[1,1])",")) \\ - M. F. Hasler, Apr 03 2012