login
Pairs of primes (p, q) such that |2p - 3q| = 1.
0

%I #25 Aug 25 2016 03:10:26

%S 5,3,7,5,11,7,17,11,19,13,29,19,43,29,47,31,61,41,71,47,79,53,89,59,

%T 101,67,107,71,109,73,151,101,163,109,191,127,197,131,223,149,227,151,

%U 251,167,269,179,271,181,317,211,349,233,359,239,421,281,439,293

%N Pairs of primes (p, q) such that |2p - 3q| = 1.

%C We observe that a(2n-1) = A265761(n+1) and a(2n) = A222565(n+1).

%e The first pair (5, 3) is in the sequence because |2*5 - 3*3| = 1;

%e The second pair (7, 5) is in the sequence because |2*7 - 3*5|= 1.

%p nn:=100:for i from 3 to nn do:

%p p:=ithprime(i):r:=irem(p,3):q:=(2*p + (-1)^(r+1))/3:

%p if isprime(q)

%p then

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

%p else

%p fi:

%p od:

%o (PARI) lista(n)=forprime(i=3,n,j=(1.5*i)\1;j+=((j+1)%2);if(isprime(j),print1(j", "i", "))) \\ _David A. Corneth_, Aug 09 2016

%Y Cf. A222565, A265761.

%K nonn

%O 1,1

%A _Michel Lagneau_, Aug 09 2016