A123921 Primes of form p*q - 2 where p and q are consecutive primes.
13, 25589, 47051, 67589, 136889, 313589, 960389, 1005971, 1932017, 2301251, 2362331, 6100889, 6310061, 6901091, 7745051, 8236817, 9332987, 10956089, 13104389, 16850987, 19009589, 19201841, 19386371, 19998701, 20566079
Offset: 1
Examples
211*223-2 = 47051.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
Programs
-
Haskell
a123921 n = a123921_list !! (n-1) a123921_list = filter ((== 1) . a010051) $ map (flip (-) 2) $ zipWith (*) a000040_list (tail a000040_list) -- Reinhard Zumkeller, Nov 11 2011
-
Maple
with (numtheory): for n from 1 to 1000 do if (tau(ithprime(n)*ithprime(n+1)-2)=2) then print(ithprime(n), ithprime(n+1), ithprime(n)*ithprime(n+1)-2); fi; od;
-
Mathematica
Select[Times@@@Partition[Prime[Range[1500]],2,1]-2,PrimeQ] (* Harvey P. Dale, Feb 23 2012 *)
-
PARI
p=2; forprime(q=3,1e5, if(isprime(t=p*q-2), print1(t", ")); p=q) \\ Charles R Greathouse IV, Apr 29 2015