login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A022884 Numbers k such that prime(k) + prime(k+3) = prime(k+1) + prime(k+2). 4

%I #33 Sep 08 2022 08:44:47

%S 3,4,5,6,9,12,16,21,25,26,27,29,33,37,41,43,48,54,56,63,71,74,77,80,

%T 81,84,88,92,93,100,103,105,108,124,125,126,134,140,142,147,149,151,

%U 153,156,165,171,175,176,181,185,191,200,208,211,216,224,234,235

%N Numbers k such that prime(k) + prime(k+3) = prime(k+1) + prime(k+2).

%H Amiram Eldar, <a href="/A022884/b022884.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Zak Seidov)

%F a(n) = A000720(A022885(n)). - _Zak Seidov_, Oct 23 2015

%e The ninth prime is 23. We verify that 23 + 37 = 60 = 29 + 31. Hence 9 is in the sequence.

%e The tenth prime is 29. We see that 29 + 41 = 70 but 31 + 37 = 68, so 10 is not in the sequence.

%t Select[Range@ 240, Prime[#] + Prime[# + 3] == Prime[# + 1] + Prime[# + 2] &] (* _Michael De Vlieger_, Oct 28 2015 *)

%o (PARI) isok(k) = prime(k+3)+prime(k) == prime(k+1)+prime(k+2); \\ _Michel Marcus_, Aug 20 2015

%o (PARI) is(n,p=prime(n))=my(q=nextprime(p+1),r=nextprime(q+1),s=nextprime(r+1)); p+s==q+r

%o n=0; forprime(p=2,1e5, if(is(n++,p), print1(n", "))) \\ _Charles R Greathouse IV_, Oct 28 2015

%o (Magma) [n: n in [1..250] |(NthPrime(n)+NthPrime(n+3)) eq (NthPrime(n+1)+ NthPrime(n+2))]; // _Vincenzo Librandi_, Nov 04 2018

%Y Cf. A000720, A022885

%Y Cf. A261470. - _Altug Alkan_, Oct 28 2015

%K nonn

%O 1,1

%A _Clark Kimberling_

%E Name edited by _Michel Marcus_, Aug 20 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 19 08:23 EDT 2024. Contains 376007 sequences. (Running on oeis4.)