login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes p such that 8p+9 and 9p+8 are both prime.
1

%I #14 Aug 20 2014 15:24:02

%S 11,29,71,79,151,211,251,401,419,461,541,599,601,659,881,1129,1231,

%T 1381,1831,1901,2309,2521,2741,2851,2879,2969,3011,3121,3301,3319,

%U 3511,3581,3719,3761,3779,3851,4099,4241,4561,4649,4691,4969,5021,5209,5531,5641

%N Primes p such that 8p+9 and 9p+8 are both prime.

%C All of the numbers in this sequence are congruent to either 1 or 9 mod 10.

%H Harvey P. Dale, <a href="/A239734/b239734.txt">Table of n, a(n) for n = 1..1000</a>

%e 11 is prime, 11*8+9 = 97 is prime, and 9*11+8 = 107 is prime. Thus, 11 is a member of this sequence.

%t Select[Prime[Range[800]],AllTrue[{8#+9,9#+8},PrimeQ]&] (* The program uses the function AllTrue from Mathematica version 10 *) (* _Harvey P. Dale_, Aug 20 2014 *)

%o (Python)

%o import sympy

%o from sympy import isprime

%o {print(n) for n in range(5000) if isprime(8*n+9) and isprime(9*n+8) and isprime(n)}

%o (PARI) s=[]; forprime(p=2, 6000, if(isprime(8*p+9) && isprime(9*p+8), s=concat(s, p))); s \\ _Colin Barker_, Mar 26 2014

%K nonn,easy

%O 1,1

%A _Derek Orr_, Mar 25 2014