cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A047847 Numbers n such that n + (n+1) and (n+2) + (n+3) are both prime.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Except for the first one, all terms are multiples of 3, as can be seen from the formula a(n+1) = 3*A056956(n). - Zak Seidov, Aug 26 2012

Examples

			If n = 6, then 6 + 7 = 13 and 8 + 9 = 17 are both prime.
		

Crossrefs

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

Formula

a(n) = (A023200(n)-1)/2 = (A046132(n)-5)/2 = 3*A056956(n-1) (for n>1).

Extensions

Corrected by Henry Bottomley, Jul 18 2000