login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Largest prime <= 2n.
30

%I #40 Sep 08 2022 08:45:03

%S 2,3,5,7,7,11,13,13,17,19,19,23,23,23,29,31,31,31,37,37,41,43,43,47,

%T 47,47,53,53,53,59,61,61,61,67,67,71,73,73,73,79,79,83,83,83,89,89,89,

%U 89,97,97,101,103,103,107,109,109,113,113,113,113,113,113,113,127,127,131

%N Largest prime <= 2n.

%C a(n) is the smallest k such that C(2n,n) divides k!. - _Benoit Cloitre_, May 30 2002

%C a(n) is largest prime factor of C(2n,n) = (2n)!/(n!)^2. - _Alexander Adamchuk_, Jul 11 2006

%C a(n) is also the largest prime in the interval [n,2n]. - _Peter Luschny_, Mar 04 2011

%C Odd prime p repeats (q-p)/2 times, where q > p is the next prime. In particular, every lesser of twin primes (A001359) occurs 1 time, every lesser more than 3 of cousin primes (A023200) occurs 2 times, etc. - _Vladimir Shevelev_, Mar 12 2012

%H Reinhard Zumkeller, <a href="/A060308/b060308.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = Max[FactorInteger[(2n)!/(n!)^2]]. - _Alexander Adamchuk_, Jul 11 2006

%F a(n) = A006530(A000142(2*n)) and a(n) = A006530(A056040(2*n)). - _Peter Luschny_, Mar 04 2011

%F a(n) ~ 2*n as n tends to infinity. - _Vladimir Shevelev_, Mar 12 2012

%F a(n) = A007917(A005843(n)) = A226078(n, A067434(n)). - _Reinhard Zumkeller_, May 25 2013

%e n=1, 2n=2, p(1) = 2 = a(1) is the largest prime not exceeding 2.

%p seq (prevprime(2*i+1), i=1..256);

%p seq(max(op(select(isprime,[$n..2*n]))),n=1..66); # _Peter Luschny_, Mar 04 2011

%t Table[Max[FactorInteger[(2n)!/(n!)^2]],{n,1,100}] (* _Alexander Adamchuk_, Jul 11 2006 *)

%t NextPrime[2*Range[80]+1,-1] (* _Harvey P. Dale_, Apr 23 2017 *)

%o (PARI) a(n)=precprime(2*n) \\ _Charles R Greathouse IV_, May 24 2013

%o (Haskell)

%o a060308 = a007917 . a005843 -- _Reinhard Zumkeller_, May 25 2013

%o (Magma) [NthPrime(#PrimesUpTo(2*n)): n in [2..100]]; // _Vincenzo Librandi_, Nov 25 2015

%Y Apart from initial term, same as A060265.

%Y Cf. A007917 (largest prime <= n), A005843 (2n).

%Y Cf. A020482, A049653, A060266, A060267, A060268, A060264.

%K nonn,easy

%O 1,1

%A _Labos Elemer_, Mar 27 2001

%E More terms from _Alexander Adamchuk_, Jul 11 2006