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.

A023247 Primes p such that 3*p + 4 and 9*p + 16 are also prime.

Original entry on oeis.org

3, 5, 23, 59, 73, 79, 109, 179, 269, 373, 383, 389, 409, 439, 509, 599, 683, 709, 929, 983, 1019, 1129, 1193, 1409, 1423, 1453, 1663, 1699, 1879, 2039, 2053, 2069, 2579, 2753, 2963, 3049, 3169, 3203, 3259, 3719, 3769, 3833, 4799, 4973, 4993, 5303, 5443, 5483
Offset: 1

Views

Author

Keywords

Comments

Original name: Numbers n such that n remains prime through 2 iterations of the function f(x) = 3x + 4.
n, 3*n + 4, 9*n + 16 are primes. - Vincenzo Librandi, Aug 04 2010
Except for a(2) = 5, all terms are congruent to 3 or 9 (mod 10). If p == 1 (mod 10), 3p + 4 == 7 (mod 10) could be prime, but then 9p + 16 == 5 (mod 10). - Alonso del Arte, Nov 23 2018

Examples

			3 * 3 + 4 = 11, which is prime, and 3 * 11 + 4 = 37, which is also prime, so 3 is in the sequence.
3 * 5 + 4 = 19, which is prime, and 3 * 19 + 4 = 61, which is also prime, so 5 is in the sequence.
3 * 7 + 4 = 25 = 5^2, so 7 is not in the sequence.
Although 3 * 11 + 4 = 37, which is prime, 3 * 37 = 115 = 5 * 23, so 11 is not in the sequence.
		

Crossrefs

Cf. A000040 (primes), A016777 (3n+1, so A016777(n+1) = 3n+4).

Programs

  • Magma
    [n: n in [0..100000] | IsPrime(n) and IsPrime(3*n+4) and IsPrime(9*n+16)]; // Vincenzo Librandi, Aug 04 2010
    
  • Mathematica
    Select[Prime[Range[800]], And@@PrimeQ[Rest[NestList[3# + 4 &, #, 2]]] &] (* Harvey P. Dale, Jan 21 2014 *)
  • PARI
    select(is(p)=isprime(3*p+4)&&isprime(9*p+16)&&isprime(p), primes([2,5500])) \\ Defines the is() function. The select() command provides a check & illustration. isprime(p) at the end improves performance if a selection is operated on primes as here. - M. F. Hasler, Nov 23 2018

Extensions

Better name from M. F. Hasler, Nov 23 2018