A001043 Numbers that are the sum of 2 successive primes.
5, 8, 12, 18, 24, 30, 36, 42, 52, 60, 68, 78, 84, 90, 100, 112, 120, 128, 138, 144, 152, 162, 172, 186, 198, 204, 210, 216, 222, 240, 258, 268, 276, 288, 300, 308, 320, 330, 340, 352, 360, 372, 384, 390, 396, 410, 434, 450, 456, 462, 472, 480, 492, 508, 520
Offset: 1
Examples
2 + 3 = 5. 3 + 5 = 8. 5 + 7 = 12. 7 + 11 = 18.
References
- Archimedeans Problems Drive, Eureka, 26 (1963), 12.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Seiichi Manyama, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
- Albert Frank & Philippe Jacqueroux, International Contest, 2001. Item 22
- Richard K. Guy, Letters to N. J. A. Sloane, June-August 1968
- N. J. A. Sloane and Brady Haran, Eureka Sequences, Numberphile video (2021)
Crossrefs
Programs
-
Haskell
a001043 n = a001043_list !! (n-1) a001043_list = zipWith (+) a000040_list $ tail a000040_list -- Reinhard Zumkeller, Oct 19 2011
-
Magma
[(NthPrime(n+1) + NthPrime(n)): n in [1..100]]; // Vincenzo Librandi, Apr 02 2011
-
Maple
Primes:= select(isprime,[2,seq(2*i+1,i=1..1000)]): n:= nops(Primes): Primes[1..n-1] + Primes[2..n]; # Robert Israel, Aug 29 2014
-
Mathematica
Table[Prime[n] + Prime[n + 1], {n, 55}] (* Ray Chandler, Feb 12 2005 *) Total/@Partition[Prime[Range[60]], 2, 1] (* Harvey P. Dale, Aug 23 2011 *) Abs[Differences[Table[(-1)^n Prime[n], {n, 60}]]] (* Alonso del Arte, Feb 03 2016 *)
-
PARI
p=2;forprime(q=3,1e3,print1(p+q", ");p=q) \\ Charles R Greathouse IV, Jun 10 2011
-
PARI
is(n)=precprime((n-1)/2)+nextprime(n/2)==n&&n>2 \\ Charles R Greathouse IV, Jun 21 2012
-
Sage
BB = primes_first_n(56) L = [] for i in range(55): L.append(BB[1 + i] + BB[i]) L # Zerinvary Lajos, May 14 2007
Formula
a(n) = A116366(n, n - 1) for n > 1. - Reinhard Zumkeller, Feb 06 2006
a(n) = 2*A024675(n-1), n>1. - R. J. Mathar, Jan 12 2024
Extensions
More terms from Larry Reeves (larryr(AT)acm.org), Mar 17 2000
Comments