A023247 Primes p such that 3*p + 4 and 9*p + 16 are also prime.
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
Keywords
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.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
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
Comments