login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A056608 Least prime factor of the n-th composite number. 38

%I #32 Mar 16 2023 21:00:19

%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.

%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). [From _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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 09:04 EDT 2024. Contains 371240 sequences. (Running on oeis4.)