login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Lesser of twin primes.
(Formerly M2476 N0982)
889

%I M2476 N0982 #353 Jan 12 2025 05:53:21

%S 3,5,11,17,29,41,59,71,101,107,137,149,179,191,197,227,239,269,281,

%T 311,347,419,431,461,521,569,599,617,641,659,809,821,827,857,881,1019,

%U 1031,1049,1061,1091,1151,1229,1277,1289,1301,1319,1427,1451,1481,1487,1607

%N Lesser of twin primes.

%C Also, solutions to phi(n + 2) = sigma(n). - Conjectured by _Jud McCranie_, Jan 03 2001; proved by _Reinhard Zumkeller_, Dec 05 2002

%C The set of primes for which the weight as defined in A117078 is 3 gives this sequence except for the initial 3. - _Rémi Eismann_, Feb 15 2007

%C The set of lesser of twin primes larger than three is a proper subset of the set of primes of the form 3n - 1 (A003627). - _Paul Muljadi_, Jun 05 2008

%C It is conjectured that A113910(n+4) = a(n+2) for all n. - _Creighton Dement_, Jan 15 2009

%C I would like to conjecture that if f(x) is a series whose terms are x^n, where n represents the terms of sequence A001359, and if we inspect {f(x)}^5, the conjecture is that every term of the expansion, say a_n * x^n, where n is odd and at least equal to 15, has a_n >= 1. This is not true for {f(x)}^k, k = 1, 2, 3 or 4, but appears to be true for k >= 5. - Paul Bruckman (pbruckman(AT)hotmail.com), Feb 03 2009

%C A164292(a(n)) = 1; A010051(a(n) - 2) = 0 for n > 1. - _Reinhard Zumkeller_, Mar 29 2010

%C From _Jonathan Sondow_, May 22 2010: (Start)

%C About 15% of primes < 19000 are the lesser of twin primes. About 26% of Ramanujan primes A104272 < 19000 are the lesser of twin primes.

%C About 46% of primes < 19000 are Ramanujan primes. About 78% of the lesser of twin primes < 19000 are Ramanujan primes.

%C A reason for the jumps is in Section 7 of "Ramanujan primes and Bertrand's postulate" and in Section 4 of "Ramanujan Primes: Bounds, Runs, Twins, and Gaps". (End)

%C Primes generated by sequence A040976. - _Odimar Fabeny_, Jul 12 2010

%C Primes of the form 2*n - 3 with 2*n - 1 prime n > 2. Primes of the form (n^2 - (n-2)^2)/2 - 1 with (n^2 - (n-2)^2)/2 + 1 prime so sum of two consecutive odd numbers/2 - 1. - _Pierre CAMI_, Jan 02 2012

%C Conjecture: For any integers n >= m > 0, there are infinitely many integers b > a(n) such that the number Sum_{k=m..n} a(k)*b^(n-k) (i.e., (a(m), ..., a(n)) in base b) is prime; moreover, when m = 1 there is such an integer b < (n+6)^2. - _Zhi-Wei Sun_, Mar 26 2013

%C Except for the initial 3, all terms are congruent to 5 mod 6. One consequence of this is that no term of this sequence appears in A030459. - _Alonso del Arte_, May 11 2013

%C Aside from the first term, all terms have digital root 2, 5, or 8. - _J. W. Helkenberg_, Jul 24 2013

%C The sequence provides all solutions to the generalized Winkler conjecture (A051451) aside from all multiples of 6. Specifically, these solutions start from n = 3 as a(n) - 3. This gives 8, 14, 26, 38, 56, ... An example from the conjecture is solution 38 from twin prime pairs (3, 5), (41, 43). - _Bill McEachen_, May 16 2014

%C Conjecture: a(n)^(1/n) is a strictly decreasing function of n. Namely a(n+1)^(1/(n+1)) < a(n)^(1/n) for all n. This conjecture is true for all a(n) <= 1121784847637957. - _Jahangeer Kholdi_ and _Farideh Firoozbakht_, Nov 21 2014

%C a(n) are the only primes, p(j), such that (p(j+m) - p(j)) divides (p(j+m) + p(j)) for some m > 0, where p(j) = A000040(j). For all such cases m=1. It is easy to prove, for j > 1, the only common factor of (p(j+m) - p(j)) and (p(j+m) + p(j)) is 2, and there are no common factors if j = 1. Thus, p(j) and p(j+m) are twin primes. Also see A067829 which includes the prime 3. - _Richard R. Forberg_, Mar 25 2015

%C Primes prime(k) such that prime(k)! == 1 (mod prime(k+1)) with the exception of prime(991) = 7841 and other unknown primes prime(k) for which (prime(k)+1)*(prime(k)+2)*...*(prime(k+1)-2) == 1 (mod prime(k+1)) where prime(k+1) - prime(k) > 2. - _Thomas Ordowski_ and _Robert Israel_, Jul 16 2016

%C For the twin prime criterion of Clement see the link. In Ribenboim, pp. 259-260 a more detailed proof is given. - _Wolfdieter Lang_, Oct 11 2017

%C Conjecture: Half of the twin prime pairs can be expressed as 8n + M where M > 8n and each value of M is a distinct composite integer with no more than two prime factors. For example, when n=1, M=21 as 8 + 21 = 29, the lesser of a twin prime pair. - _Martin Michael Musatov_, Dec 14 2017

%C For a discussion of bias in the distribution of twin primes, see my article on the Vixra web site. - _Waldemar Puszkarz_, May 08 2018

%C Since 2^p == 2 (mod p) (Fermat's little theorem), these are primes p such that 2^p == q (mod p), where q is the next prime after p. - _Thomas Ordowski_, Oct 29 2019, edited by _M. F. Hasler_, Nov 14 2019

%C The yet unproved "Twin Prime Conjecture" states that this sequence is infinite. - _M. F. Hasler_, Nov 14 2019

%C Lesser of the twin primes are the set of elements that occur in both A162566, A275697. Proof: A prime p will only have integer solutions to both (p+1)/g(p) and (p-1)/g(p) when p is the lesser of a twin prime, where g(p) is the gap between p and the next prime, because gcd(p+1,p-1) = 2. - _Ryan Bresler_, Feb 14 2021

%C From _Lorenzo Sauras Altuzarra_, Dec 21 2021: (Start)

%C J. A. Hervás Contreras observed the subsequence 11, 311, 18311, 1518311, 421518311... (see the links), which led me to conjecture the following statements.

%C I. If i is an integer greater than 2, then there exist positive integers j and k such that a(j) equals the concatenation of 3k and a(i).

%C II. If k is a positive integer, then there exist positive integers i and j such that a(j) equals the concatenation of 3k and a(i).

%C III. If i, j, and r are positive integers such that i > 2 and a(j) equals the concatenation of r and a(i), then 3 divides r. (End)

%D Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.

%D T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 6.

%D Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.2 Prime Numbers, p. 81.

%D P. Ribenboim, The New Book of Prime Number Records, Springer-Verlag NY 1996, pp. 259-260.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Chris K. Caldwell, <a href="/A001359/b001359.txt">Table of n, a(n) for n = 1..100000</a>

%H Milton Abramowitz and Irene A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].

%H Abhinav Aggarwal, Zekun Xu, Oluwaseyi Feyisetan, and Nathanael Teissier, <a href="https://arxiv.org/abs/2009.08559">On Primes, Log-Loss Scores and (No) Privacy</a>, arXiv:2009.08559 [cs.LG], 2020.

%H Chris K. Caldwell, <a href="http://www.utm.edu/research/primes/lists/small/100ktwins.txt">First 100000 Twin Primes</a>

%H Chris K. Caldwell, <a href="https://t5k.org/top20/page.php?id=1">Twin Primes</a>

%H Chris K. Caldwell, <a href="http://www.utm.edu/research/primes/largest.html#biggest">Largest known twin primes</a>

%H Chris K. Caldwell, <a href="https://t5k.org/glossary/page.php?sort=TwinPrime">Twin primes</a>

%H Chris K. Caldwell, <a href="http://www.utm.edu/research/primes/">The prime pages</a>

%H P. A. Clement, <a href="http://www.jstor.org/stable/2305816">Congruences for sets of primes</a>, American Mathematical Monthly, vol. 56,1 (1949), 23-25.

%H Harvey Dubner, <a href="http://www.emis.de/journals/JIS/VOL8/Dubner/dubner71.html">Twin Prime Statistics</a>, Journal of Integer Sequences, Vol. 8 (2005), Article 05.4.2.

%H Andrew Granville and Greg Martin, <a href="https://arxiv.org/abs/math/0408319">Prime number races</a>, arXiv:math/0408319 [math.NT], 2004; Amer. Math. Monthly, 113 (No. 1, 2006), 1-33.

%H José Antonio Hervás Contreras, <a href="https://www.gaussianos.com/forogauss/topic/nueva-propiedad-de-los-primos-gemelos/">¿Nueva propiedad de los primos gemelos?</a>

%H Thomas R. Nicely, <a href="https://faculty.lynchburg.edu/~nicely/index.html">Some Results of Computational Research in Prime Numbers</a> [See local copy in A007053]

%H Thomas R. Nicely, <a href="https://faculty.lynchburg.edu/~nicely/twins/twins.html">Enumeration to 10^14 of the twin primes and Brun's constant</a>, Virginia Journal of Science, 46:3 (Fall, 1995), 195-204.

%H Thomas R. Nicely, <a href="/A001359/a001359.pdf">Enumeration to 10^14 of the twin primes and Brun's constant</a> [Local copy, pdf only]

%H Omar E. Pol, <a href="http://www.polprimos.com">Determinacion geometrica de los numeros primos y perfectos</a>.

%H Waldemar Puszkarz, <a href="http://vixra.org/abs/1804.0416">Statistical Bias in the Distribution of Prime Pairs and Isolated Primes</a>, vixra:1804.0416 (2018).

%H Fred Richman, <a href="http://math.fau.edu/Richman/primes.htm">Generating primes by the sieve of Eratosthenes</a>

%H Maxie D. Schmidt, <a href="https://arxiv.org/abs/1701.04741">New Congruences and Finite Difference Equations for Generalized Factorial Functions</a>, arXiv:1701.04741 [math.CO], 2017.

%H P. Shiu, <a href="http://dx.doi.org/10.1080/10586458.2005.10128903">A Diophantine Property Associated with Prime Twins</a>, Experimental mathematics 14 (1) (2005).

%H Jonathan Sondow, <a href="http://arxiv.org/abs/0907.5232">Ramanujan primes and Bertrand's postulate</a>, arXiv:0907.5232 [math.NT], 2009-2010; Amer. Math. Monthly, 116 (2009) 630-635.

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

%H Jonathan Sondow and Emmanuel Tsukerman, <a href="https://arxiv.org/abs/1401.0322">The p-adic order of power sums, the Erdos-Moser equation, and Bernoulli numbers</a>, arXiv:1401.0322 [math.NT], 2014; see section 4.

%H Terence Tao, <a href="https://arxiv.org/abs/math/0505402">Obstructions to uniformity and arithmetic patterns in the primes</a>, arXiv:math/0505402 [math.NT], 2005.

%H Apoloniusz Tyszka, <a href="https://philarchive.org/rec/TYSDAS">On sets X subset of N for which we know an algorithm that computes a threshold number t(X) in N such that X is infinite if and only if X contains an element greater than t(X)</a>, 2019.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TwinPrimes.html">Twin Primes</a>

%H <a href="/index/Pri#gaps">Index entries for primes, gaps between</a>

%F a(n) = A077800(2n-1).

%F A001359 = { n | A071538(n-1) = A071538(n)-1 }; A071538(A001359(n)) = n. - _M. F. Hasler_, Dec 10 2008

%F A001359 = { prime(n) : A069830(n) = A087454(n) }. - _Juri-Stepan Gerasimov_, Aug 23 2011

%F a(n) = prime(A029707(n)). - _R. J. Mathar_, Feb 19 2017

%p select(k->isprime(k+2),select(isprime,[$1..1616])); # _Peter Luschny_, Jul 21 2009

%p A001359 := proc(n)

%p option remember;

%p if n = 1

%p then 3;

%p else

%p p := nextprime(procname(n-1)) ;

%p while not isprime(p+2) do

%p p := nextprime(p) ;

%p end do:

%p p ;

%p end if;

%p end proc: # _R. J. Mathar_, Sep 03 2011

%t Select[Prime[Range[253]], PrimeQ[# + 2] &] (* _Robert G. Wilson v_, Jun 09 2005 *)

%t a[n_] := a[n] = (p = NextPrime[a[n - 1]]; While[!PrimeQ[p + 2], p = NextPrime[p]]; p); a[1] = 3; Table[a[n], {n, 51}] (* _Jean-François Alcover_, Dec 13 2011, after _R. J. Mathar_ *)

%t nextLesserTwinPrime[p_Integer] := Block[{q = p + 2}, While[NextPrime@ q - q > 2, q = NextPrime@ q]; q]; NestList[nextLesserTwinPrime@# &, 3, 50] (* _Robert G. Wilson v_, May 20 2014 *)

%t Select[Partition[Prime[Range[300]],2,1],#[[2]]-#[[1]]==2&][[All,1]] (* _Harvey P. Dale_, Jan 04 2021 *)

%t q = Drop[Prepend[p = Prime[Range[100]], 2], -1];

%t Flatten[q[[#]] & /@ Position[p - q, 2]] (* _Horst H. Manninger_, Mar 28 2021 *)

%o (PARI) A001359(n,p=3) = { while( p+2 < (p=nextprime( p+1 )) || n-->0,); p-2}

%o /* The following gives a reasonably good estimate for any value of n from 1 to infinity; compare to A146214. */

%o A001359est(n) = solve( x=1,5*n^2/log(n+1), 1.320323631693739*intnum(t=2.02,x+1/x,1/log(t)^2)-log(x) +.5 - n)

%o /* The constant is A114907; the expression in front of +.5 is an estimate for A071538(x) */ \\ _M. F. Hasler_, Dec 10 2008

%o (Magma) [n: n in PrimesUpTo(1610) | IsPrime(n+2)]; // _Bruno Berselli_, Feb 28 2011

%o (Haskell)

%o a001359 n = a001359_list !! (n-1)

%o a001359_list = filter ((== 1) . a010051' . (+ 2)) a000040_list

%o -- _Reinhard Zumkeller_, Feb 10 2015

%o (Python)

%o from sympy import primerange, isprime

%o print([n for n in primerange(1, 2001) if isprime(n + 2)]) # _Indranil Ghosh_, Jul 20 2017

%Y Subsequence of A003627.

%Y Cf. A006512 (greater of twin primes), A014574, A001097, A077800, A002822, A040040, A054735, A067829, A082496, A088328, A117078, A117563, A074822, A071538, A007508, A146214, A350246, A350247.

%Y Cf. A104272 (Ramanujan primes), A178127 (lesser of twin Ramanujan primes), A178128 (lesser of twin primes if it is a Ramanujan prime).

%Y Cf. A010051, A000040.

%K nonn,nice,easy,changed

%O 1,1

%A _N. J. A. Sloane_