%I #38 Jul 06 2024 13:40:24
%S 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,
%T 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,
%U 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
%N Least prime factor of the n-th composite number.
%C Record values are seen when n = A120389(m). Conjecture: at each new record the count of the prior record follows A247509. Records seen are 2, 3, 5, 7, 11, ... and when 3, 5, 7, 11 are first seen, there have been 3, 3, 2, and 4 occurrences of 2, 3, 5, and 7. These are A247509(1) through A247509(4). Thus, the count for prime(60) would be A247509(60). - _Bill McEachen_, Jun 17 2024
%H Reinhard Zumkeller, <a href="/A056608/b056608.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A020639(A002808(n)) = A000040(A118663(n)). - _M. F. Hasler_, Apr 03 2012
%t DeleteCases[Table[FactorInteger[n][[1, 1]] * Boole[Not[PrimeQ[n]]], {n, 2, 100}], 0] (* _Alonso del Arte_, Aug 21 2014 *)
%t FactorInteger[#][[1,1]]&/@Select[Range[200],CompositeQ] (* _Harvey P. Dale_, Mar 16 2023 *)
%o (Magma) [ PrimeDivisors(n)[1]: n in [2..140] | not IsPrime(n) ]; // _Klaus Brockhaus_, Jun 23 2009
%o (Haskell)
%o a056608 = a020639 . a002808 -- _Reinhard Zumkeller_, Mar 29 2014
%o (PARI) forcomposite(n=1, 1e2, p=factor(n)[1, 1]; print1(p, ", ")) \\ _Felix Fröhlich_, Aug 03 2014
%o (Python)
%o from sympy import composite, factorint
%o def A056608(n):
%o return min(factorint(composite(n))) # _Chai Wah Wu_, Jul 22 2019
%Y Cf. A052369 (largest prime factor of n, where n runs through composite numbers). - _Klaus Brockhaus_, Jun 23 2009
%Y Cf. A160180.
%K easy,nonn
%O 1,1
%A _Odimar Fabeny_, Aug 07 2000
%E More terms from _James A. Sellers_, Aug 25 2000
%E Definition corrected by _Reinhard Zumkeller_, Mar 29 2014
%E Name changed by _Alonso del Arte_, Aug 21 2014