login
Lesser of twin primes if it is a Ramanujan prime.
5

%I #22 Jan 23 2020 08:24:13

%S 11,17,29,41,59,71,101,107,149,179,227,239,269,281,311,347,419,431,

%T 461,569,599,641,659,809,821,827,857,881,1019,1031,1049,1061,1091,

%U 1151,1229,1277,1289,1301,1427,1451,1481,1487,1607,1667,1721,1787,1871,1877,1997

%N Lesser of twin primes if it is a Ramanujan prime.

%C By definition, a number p is a member if p and p+2 are primes and p is a Ramanujan prime A104272.

%C Supersequence of A178127.

%C In the first 328 pairs of twin primes, more than 78% of their first members are Ramanujan primes. For a partial explanation, see "Ramanujan primes and Bertrand's postulate" Section 7.

%C See A001359 and A104272 for additional comments, links, and references.

%H Amiram Eldar, <a href="/A178128/b178128.txt">Table of n, a(n) for n = 1..10000</a>

%H J. Sondow, <a href="http://arxiv.org/abs/0907.5232">Ramanujan primes and Bertrand's postulate</a>, arXiv:0907.5232 [math.NT], 2009, 2010.

%H J. Sondow, <a href="http://www.jstor.org/stable/40391170">Ramanujan primes and Bertrand's postulate</a>, Amer. Math. Monthly, 116 (2009), 630-635.

%H J. Sondow, J. W. Nicholson, and T. D. Noe, <a href="http://arxiv.org/abs/1105.2249"> Ramanujan Primes: Bounds, Runs, Twins, and Gaps</a>, J. Integer Seq. 14 (2011) Article 11.6.2.

%F A001359 intersect A104272.

%e a(1) = 11 because 11 and 13 are the 1st twin primes the lesser of which is a Ramanujan prime.

%t nn = 200; R = Table[0, {nn}]; s = 0;

%t Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s < nn, R[[s + 1]] = k], {k, Prime[3 nn]}];

%t A104272 = R + 1;

%t A001359 = Select[Prime[Range[2 nn]], PrimeQ[# + 2]&];

%t Intersection[A001359, A104272] (* _Jean-François Alcover_, Nov 07 2018, using _T. D. Noe_'s code for A104262 *)

%o (Perl) use ntheory ":all"; my @t = grep { is_prime($_+2) } @{ramanujan_primes(10000)}; say "@t"; # _Dana Jacobsen_, Sep 06 2015

%Y Cf. A001359 (lesser of twin primes), A104272 (Ramanujan primes), A164371 (lesser of twin prime pairs which are non-Ramanujan primes), A178127 (lesser of twin Ramanujan primes).

%K nonn

%O 1,1

%A _Jonathan Sondow_, May 20 2010