A014574 Average of twin prime pairs.
4, 6, 12, 18, 30, 42, 60, 72, 102, 108, 138, 150, 180, 192, 198, 228, 240, 270, 282, 312, 348, 420, 432, 462, 522, 570, 600, 618, 642, 660, 810, 822, 828, 858, 882, 1020, 1032, 1050, 1062, 1092, 1152, 1230, 1278, 1290, 1302, 1320, 1428, 1452, 1482, 1488, 1608
Offset: 1
References
- Archimedeans Problems Drive, Eureka, 30 (1967).
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- C. K. Caldwell, The Prime Glossary: Twin primes
- C. K. Caldwell, The Top Twenty: Twin Primes
- Y. Fujiwara, Parsing a Sequence of Qubits, IEEE Trans. Information Theory, 59 (2013), 6796-6806.
- Y. Fujiwara, Parsing a Sequence of Qubits, arXiv:1207.1138 [quant-ph], 2012-2013.
- L. J. Gerstein, A reformulation of the Goldbach conjecture, Math. Mag., 66 (1993), 44-45.
- Brian Hayes, Does having prime neighbors make you more composite?, Bit-Player Article, Nov 04 2021
- Eric Weisstein's World of Mathematics, Twin Primes
Crossrefs
Programs
-
GAP
a:=1+Filtered([1..2000],p->IsPrime(p) and IsPrime(p+2)); # Muniru A Asiru, May 20 2018
-
Haskell
a014574 n = a014574_list !! (n-1) a014574_list = [x | x <- [2,4..], a010051 (x-1) == 1, a010051 (x+1) == 1] -- Reinhard Zumkeller, Apr 11 2012
-
Maple
P := select(isprime,[$1..1609]): map(p->p+1,select(p->member(p+2,P),P)); # Peter Luschny, Mar 03 2011 A014574 := proc(n) option remember; local p ; if n = 1 then 4 ; else p := nextprime( procname(n-1) ) ; while not isprime(p+2) do p := nextprime(p) ; od ; return p+1 ; end if ; end proc: # R. J. Mathar, Jun 11 2011
-
Mathematica
Select[Table[Prime[n] + 1, {n, 260}], PrimeQ[ # + 1] &] (* Ray Chandler, Oct 12 2005 *) Mean/@Select[Partition[Prime[Range[300]],2,1],Last[#]-First[#]==2&] (* Harvey P. Dale, Jan 16 2014 *)
-
Maxima
A014574(n) := block( if n = 1 then return(4), p : A014574(n-1) , for k : 2 step 2 do ( if primep(p+k-1) and primep(p+k+1) then return(p+k) ) )$ /* R. J. Mathar, Mar 15 2012 */
-
PARI
p=2;forprime(q=3,1e4,if(q-p==2,print1(p+1", "));p=q) \\ Charles R Greathouse IV, Jun 10 2011
Formula
a(n) = A129297(n+4). - Reinhard Zumkeller, Apr 09 2007
a(n) = 6*A002822(n-1), n>=2. - Ivan N. Ianakiev, Aug 19 2013
a(n)^4 - 4*a(n)^2 = A062354(a(n)^2 - 1). - Raphie Frank, Oct 17 2013
Extensions
Offset changed to 1 by R. J. Mathar, Jun 11 2011
Comments