login
Distance between pairs of primes differing by 4.
5

%I #11 Aug 10 2017 23:50:56

%S 4,6,6,18,6,24,12,18,6,6,18,36,30,30,6,48,30,6,36,30,18,42,18,6,24,12,

%T 114,30,30,66,18,12,54,30,6,18,6,24,30,30,42,78,6,120,66,18,6,120,6,

%U 18,36,6,60,18,12,18,12,54,30,90,84,6,120,6,84,54,66,36,30,24,54,30,12,48

%N Distance between pairs of primes differing by 4.

%H Vincenzo Librandi, <a href="/A053320/b053320.txt">Table of n, a(n) for n = 1..1000</a>

%p with(numtheory): pre:=0: for n from 1 to 3000 do if isprime(n) and isprime(n+4) then if pre<>0 then printf("%d, ",n-pre) fi: pre:=n fi od: # C. Ronaldo

%t Differences[Select[Prime[Range[500]], PrimeQ[# + 4]&]] (* _Vincenzo Librandi_, Jul 11 2013 *)

%Y First differences of A023200.

%Y Cf. A227346.

%K nonn,easy

%O 1,1

%A _Labos Elemer_, Mar 06 2000