login
Numbers k such that k-th and (k+1)st primes differ by 4.
31

%I #29 Apr 30 2024 05:29:10

%S 4,6,8,12,14,19,22,25,27,29,31,38,44,48,50,59,63,65,70,75,78,85,88,90,

%T 93,95,112,117,122,131,134,136,143,147,149,151,153,155,159,163,169,

%U 181,183,198,207,211,213,224,226,229,235,237,244,247,249,251

%N Numbers k such that k-th and (k+1)st primes differ by 4.

%C Positions of 4 in A001223. - _Zak Seidov_, Apr 28 2015

%H N. J. A. Sloane and K. D. Bajpai, <a href="/A029709/b029709.txt">Table of n, a(n) for n = 1..10213</a> (first 56 terms from N. J. A. Sloane)

%F A029710(n) = prime(a(n)). - _R. J. Mathar_, Apr 30 2024

%t Select[Range[2, 300], 4 == (Prime[# + 1] - Prime[#]) &] (* _Vincenzo Librandi_, Apr 28 2015 *)

%o (Magma) [n: n in [0..300] | NthPrime(n+1) - NthPrime(n) eq 4]; // _Vincenzo Librandi_, Apr 28 2015

%Y Cf. A023200, A029710, A001223.

%K nonn

%O 1,1

%A _N. J. A. Sloane_