login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A225726 Lesser of two consecutive primes, p < q, such that p*q + p - q and p*q - p + q are also consecutive primes. 1

%I

%S 2,3,23,991,1621,3301,5471,5683,6563,6581,7829,10061,13841,16981,

%T 18199,26203,28403,32003,35671,37561,41771,42571,55529,55603,58543,

%U 60251,71861,75931,92809,98993,103669,104281,116953,117751,125591,139969,142151,155509,160073

%N Lesser of two consecutive primes, p < q, such that p*q + p - q and p*q - p + q are also consecutive primes.

%H Paolo P. Lava and Charles R Greathouse IV, <a href="/A225726/b225726.txt">Table of n, a(n) for n = 1..10000</a> (first 100 terms from Lava)

%e 2 prime, 3 next-prime and 2*3 + 2 - 3 = 5 prime, 2*3 - 2 + 3 = 7 next-prime, so a(1) = 2.

%p with(numtheory); listA225726:=proc(q) local a,b,n;

%p for n from 1 to q do a:=ithprime(n); b:=nextprime(a);

%p if isprime(a*b+a-b) and a*b-a+b=nextprime(a*b+a-b) then print(a);

%p fi; od; end: listA225726(10^6); # _Paolo P. Lava_, May 14 2013

%t acpQ[{p_,q_}]:=Module[{c=p*q+p-q},PrimeQ[c]&&NextPrime[c]==p*q-p+q]; Select[ Partition[Prime[Range[15000]],2,1],acpQ][[All,1]] (* _Harvey P. Dale_, Oct 09 2017 *)

%o (PARI) p=2; forprime(q=3,1e6,my(pq=p*q); if(isprime(pq+p-q) && nextprime(pq+p-q+1)==pq-p+q, print1(p", ")); p=q) \\ _Charles R Greathouse IV_, Mar 18 2014

%Y Cf. A154553.

%K nonn

%O 1,1

%A _Irina Gerasimova_, May 13 2013

%E Added a(5), a(6) and a(20)-a(39) by _Paolo P. Lava_, May 14 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 27 06:18 EST 2022. Contains 350601 sequences. (Running on oeis4.)