login
Numbers that are the sum of 2 successive primes.
(Formerly M3780 N0968)
167

%I M3780 N0968 #108 May 11 2024 21:54:59

%S 5,8,12,18,24,30,36,42,52,60,68,78,84,90,100,112,120,128,138,144,152,

%T 162,172,186,198,204,210,216,222,240,258,268,276,288,300,308,320,330,

%U 340,352,360,372,384,390,396,410,434,450,456,462,472,480,492,508,520

%N Numbers that are the sum of 2 successive primes.

%C Arithmetic derivative (see A003415) of prime(n)*prime(n+1). - _Giorgio Balzarotti_, May 26 2011

%C A008472(a(n)) = A191583(n). - _Reinhard Zumkeller_, Jun 28 2011

%C With the exception of the first term, all terms are even. a(n) is divisible by 4 if the difference between prime(n) and prime(n + 1) is not divisible by 4; e.g., prime(n) = 1 mod 4 and prime(n + 1) = 3 mod 4. In general, for a(n) to be divisible by some even number m > 2 requires that prime(n + 1) - prime(n) not be a multiple of m. - _Alonso del Arte_, Jan 30 2012

%D Archimedeans Problems Drive, Eureka, 26 (1963), 12.

%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 Seiichi Manyama, <a href="/A001043/b001043.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe)

%H Albert Frank & Philippe Jacqueroux, <a href="http://www.paulcooijmans.com/others/intcontest.pdf">International Contest</a>, 2001. Item 22

%H Richard K. Guy, <a href="/A002186/a002186.pdf">Letters to N. J. A. Sloane, June-August 1968</a>

%H N. J. A. Sloane and Brady Haran, <a href="https://www.youtube.com/watch?v=6X2D497is6Y">Eureka Sequences</a>, Numberphile video (2021)

%F a(n) = prime(n) + prime(n + 1) = A000040(n) + A000040(n+1).

%F a(n) = A116366(n, n - 1) for n > 1. - _Reinhard Zumkeller_, Feb 06 2006

%F a(n) = 2*A024675(n-1), n>1. - _R. J. Mathar_, Jan 12 2024

%e 2 + 3 = 5.

%e 3 + 5 = 8.

%e 5 + 7 = 12.

%e 7 + 11 = 18.

%p Primes:= select(isprime,[2,seq(2*i+1,i=1..1000)]):

%p n:= nops(Primes):

%p Primes[1..n-1] + Primes[2..n]; # _Robert Israel_, Aug 29 2014

%t Table[Prime[n] + Prime[n + 1], {n, 55}] (* _Ray Chandler_, Feb 12 2005 *)

%t Total/@Partition[Prime[Range[60]], 2, 1] (* _Harvey P. Dale_, Aug 23 2011 *)

%t Abs[Differences[Table[(-1)^n Prime[n], {n, 60}]]] (* _Alonso del Arte_, Feb 03 2016 *)

%o (Sage)

%o BB = primes_first_n(56)

%o L = []

%o for i in range(55): L.append(BB[1 + i] + BB[i])

%o L # _Zerinvary Lajos_, May 14 2007

%o (Magma) [(NthPrime(n+1) + NthPrime(n)): n in [1..100]]; // _Vincenzo Librandi_, Apr 02 2011

%o (PARI) p=2;forprime(q=3,1e3,print1(p+q", ");p=q) \\ _Charles R Greathouse IV_, Jun 10 2011

%o (PARI) is(n)=precprime((n-1)/2)+nextprime(n/2)==n&&n>2 \\ _Charles R Greathouse IV_, Jun 21 2012

%o (Haskell)

%o a001043 n = a001043_list !! (n-1)

%o a001043_list = zipWith (+) a000040_list $ tail a000040_list

%o -- _Reinhard Zumkeller_, Oct 19 2011

%Y Subsequence of A050936.

%Y Cf. A000040 (primes), A031131 (first differences).

%K nonn,nice,easy

%O 1,1

%A _N. J. A. Sloane_, _R. K. Guy_

%E More terms from Larry Reeves (larryr(AT)acm.org), Mar 17 2000