A047847 Numbers n such that n + (n+1) and (n+2) + (n+3) are both prime.
1, 3, 6, 9, 18, 21, 33, 39, 48, 51, 54, 63, 81, 96, 111, 114, 138, 153, 156, 174, 189, 198, 219, 228, 231, 243, 249, 306, 321, 336, 369, 378, 384, 411, 426, 429, 438, 441, 453, 468, 483, 504, 543, 546, 606, 639, 648, 651, 711, 714, 723, 741, 744, 774, 783, 789
Offset: 1
Examples
If n = 6, then 6 + 7 = 13 and 8 + 9 = 17 are both prime.
Links
- Jayanta Basu, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[790], And @@ PrimeQ[{2*# + 1, 2*# + 5}] &] (* Jayanta Basu, Aug 11 2013 *) Select[Range[800],AllTrue[2#+{1,5},PrimeQ]&] (* Harvey P. Dale, Jan 28 2023 *)
-
PARI
is_A047847(n)=isprime(n*2+1)&isprime(n*2+5) \\ - M. F. Hasler, Aug 26 2012
Extensions
Corrected by Henry Bottomley, Jul 18 2000
Comments