A143206 Product of the n-th cousin prime pair.
21, 77, 221, 437, 1517, 2021, 4757, 6557, 9797, 11021, 12317, 16637, 27221, 38021, 50621, 53357, 77837, 95477, 99221, 123197, 145157, 159197, 194477, 210677, 216221, 239117, 250997, 378221, 416021, 455621, 549077, 576077, 594437, 680621
Offset: 1
Keywords
Examples
a(1) = 3*7 = 3*(3+4) = 21; a(2) = 7*11 = 7*(7+4) = 77; a(3) = 13*17 = 13*(13+4) = 221; a(4) = 19*23 = 19*(19+4) = 437.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Cousin Primes
Programs
-
Haskell
a143206 n = a143206_list !! (n-1) a143206_list = (3*7) : f a000040_list where f (p:ps@(p':_)) | p'-p == 4 = (p*p') : f ps | otherwise = f ps -- Reinhard Zumkeller, Sep 13 2011
-
Magma
[(p*(p+4)): p in PrimesUpTo(1000)| IsPrime(p+4)]; // Vincenzo Librandi, Jan 04 2018
-
Mathematica
fQ[n_] := Block[{fi = FactorInteger@ n}, Last@# & /@ fi == {1, 1} && Differences[ First@# & /@ fi] == {4}]; Select[ Range@ 700000, fQ] (* Robert G. Wilson v, Feb 08 2012 *)
-
PARI
lista(nn) = forprime(p=2, nn, if (isprime(q=p+4), print1(p*q, ", "))); \\ Michel Marcus, Jan 04 2018
Comments