cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A022884 #33 Sep 08 2022 08:44:47
%S A022884 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 A022884 81,84,88,92,93,100,103,105,108,124,125,126,134,140,142,147,149,151,
%U A022884 153,156,165,171,175,176,181,185,191,200,208,211,216,224,234,235
%N A022884 Numbers k such that prime(k) + prime(k+3) = prime(k+1) + prime(k+2).
%H A022884 Amiram Eldar, <a href="/A022884/b022884.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Zak Seidov)
%F A022884 a(n) = A000720(A022885(n)). - _Zak Seidov_, Oct 23 2015
%e A022884 The ninth prime is 23. We verify that 23 + 37 = 60 = 29 + 31. Hence 9 is in the sequence.
%e A022884 The tenth prime is 29. We see that 29 + 41 = 70 but 31 + 37 = 68, so 10 is not in the sequence.
%t A022884 Select[Range@ 240, Prime[#] + Prime[# + 3] == Prime[# + 1] + Prime[# + 2] &] (* _Michael De Vlieger_, Oct 28 2015 *)
%o A022884 (PARI) isok(k) = prime(k+3)+prime(k) == prime(k+1)+prime(k+2); \\ _Michel Marcus_, Aug 20 2015
%o A022884 (PARI) is(n,p=prime(n))=my(q=nextprime(p+1),r=nextprime(q+1),s=nextprime(r+1)); p+s==q+r
%o A022884 n=0; forprime(p=2,1e5, if(is(n++,p), print1(n", "))) \\ _Charles R Greathouse IV_, Oct 28 2015
%o A022884 (Magma) [n: n in [1..250] |(NthPrime(n)+NthPrime(n+3)) eq (NthPrime(n+1)+ NthPrime(n+2))]; // _Vincenzo Librandi_, Nov 04 2018
%Y A022884 Cf. A000720, A022885
%Y A022884 Cf. A261470. - _Altug Alkan_, Oct 28 2015
%K A022884 nonn
%O A022884 1,1
%A A022884 _Clark Kimberling_
%E A022884 Name edited by _Michel Marcus_, Aug 20 2015