A056608 Least prime factor of the n-th composite number.
2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 5, 2, 3, 2, 2, 2, 3, 2, 5, 2, 2, 3, 2, 2, 2, 3, 2, 2, 7, 2, 3, 2, 2, 5, 2, 3, 2, 2, 2, 3, 2, 5, 2, 2, 3, 2, 2, 2, 3, 2, 7, 2, 2, 3, 2, 2, 5, 2, 3, 2, 2, 7, 2, 3, 2, 5, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 5, 2, 3, 2, 7, 2, 11, 2, 3, 2, 5, 2, 2, 3, 2, 2, 7, 2, 3, 2, 2, 2
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A052369 (largest prime factor of n, where n runs through composite numbers). - Klaus Brockhaus, Jun 23 2009
Cf. A160180.
Programs
-
Haskell
a056608 = a020639 . a002808 -- Reinhard Zumkeller, Mar 29 2014
-
Magma
[ PrimeDivisors(n)[1]: n in [2..140] | not IsPrime(n) ]; // Klaus Brockhaus, Jun 23 2009
-
Mathematica
DeleteCases[Table[FactorInteger[n][[1, 1]] * Boole[Not[PrimeQ[n]]], {n, 2, 100}], 0] (* Alonso del Arte, Aug 21 2014 *) FactorInteger[#][[1,1]]&/@Select[Range[200],CompositeQ] (* Harvey P. Dale, Mar 16 2023 *)
-
PARI
forcomposite(n=1, 1e2, p=factor(n)[1, 1]; print1(p, ", ")) \\ Felix Fröhlich, Aug 03 2014
-
Python
from sympy import composite, factorint def A056608(n): return min(factorint(composite(n))) # Chai Wah Wu, Jul 22 2019
Formula
Extensions
More terms from James Sellers, Aug 25 2000
Definition corrected by Reinhard Zumkeller, Mar 29 2014
Name changed by Alonso del Arte, Aug 21 2014
Comments