login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239732 Primes p such that 2p+9 and 9p+2 are both prime. 1

%I #9 Apr 23 2014 17:29:07

%S 5,11,19,29,31,71,101,109,131,151,179,211,229,239,269,281,311,491,521,

%T 541,719,739,751,809,919,929,971,1051,1061,1129,1181,1291,1361,1439,

%U 1481,1621,1741,1811,1831,2111,2131,2221,2371,2389,2411,2521,2539,2549,2689,2791

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

%C All of the numbers in this sequence, except a(1), are either 1 or 9 mod 10.

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

%e 5 is prime, 2*5+9 = 19 is prime, and 9*5+2 = 47 is prime. Thus, 5 is a member of this sequence.

%t Select[Prime[Range[500]],And@@PrimeQ[{2#+9,9#+2}]&] (* _Harvey P. Dale_, Apr 23 2014 *)

%o (Python)

%o import sympy

%o from sympy import isprime

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

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

%K nonn,easy

%O 1,1

%A _Derek Orr_, Mar 25 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 6 03:14 EDT 2024. Contains 375701 sequences. (Running on oeis4.)