login
Consider the numbers m such that m = prime(k) + prime(k+2i+1) = prime(k+i) + prime(k+i+1) for some i and k. The sequence lists the number of pairs (i,k) giving the same value m = A105093(n).
0

%I #8 Oct 25 2015 17:45:14

%S 1,2,2,1,4,3,4,2,2,2,1,1,2,6,5,4,1,2,1,4,4,5,7,3,6,7,1,2,1,7,10,7,7,2,

%T 6,1,5,10,12,5,10,3,5,11,9,9,8,2,6,2,2,3,10,1,5,11,10,7,7,5,3,5,5,1,4,

%U 2,4,2,5,7,4,5,8,7,6,5,3,7,13,1,1,9,5,1

%N Consider the numbers m such that m = prime(k) + prime(k+2i+1) = prime(k+i) + prime(k+i+1) for some i and k. The sequence lists the number of pairs (i,k) giving the same value m = A105093(n).

%C The form m = prime(k) + prime(k+2i+1) = prime(k+i) + prime(k+i+1) is a generalization of A105093 (form prime(k) + prime(k+3) = prime(k+1) + prime(k+2), and the set of the numbers m is exactly A105093(n).

%e a(6) = 3 because A105093(6)= 84 and:

%e for (i,k)=(1,12), prime(12)+ prime(15)= prime(13)+ prime(14)=37+47=41+43=84;

%e for (i,k)=(2,11), prime(11)+ prime(16)= prime(12)+ prime(15)=31+53=37+47=84;

%e for (i,k)=(4,9), prime(9)+ prime(18)= prime(13)+ prime(14)=23+61=41+43=84.

%e So, we find 3 pairs (i,k) giving m = 84.

%p with(numtheory):nn:=5000:

%p A105093:={18,24,30,36,60,84,120,162,204,210,216,240,288,330,372,390,456,520,540,624,726,762,798,840,852,882,924,978,990,1104,1140,1164,1200,1392,1410,1428,1530,1632,1650,1716,1740,1764,1794,1848,1974,2052,2100,2112,2184,2226,2334,2460,2580,2604,2688,2856,2970,2976,3054,3102,3138,3150,3180,3240,3500,3536,3612,3744,3750,3882,3966,3996,4056,4092,4170,4242,4680,4698,4728,4782,4810,5100,5376,5460}:n0:=nops(A105093):

%p for n from 1 to n0 do:

%p ii:=0:it:=0:q:=A105093[n]:

%p for i from 1 to 100 do:

%p for k from 1 to nn do:

%p s1:=ithprime(k)+ithprime(k+2*i+1):

%p s2:= ithprime(k+i)+ithprime(k+i+1):

%p if s1=s2 and s1=q

%p then

%p it:=it+1:

%p else

%p fi:

%p od:

%p od:

%p printf(`%d, `,it):

%p od:

%Y Cf. A105093.

%K nonn

%O 1,2

%A _Michel Lagneau_, Oct 12 2015