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!)
A138248 Prime numbers k such that 18*k - 1 and 18*k + 1 are twin primes. 2
11, 29, 59, 71, 181, 199, 241, 251, 431, 491, 809, 991, 1051, 1109, 1151, 1231, 1249, 1289, 1319, 1459, 1571, 1931, 1949, 2099, 2411, 2729, 2909, 2939, 3301, 3461, 3499, 3511, 3881, 3889, 4201, 4231, 4651, 4679, 4721, 4889, 5011, 5081, 5209, 5639, 6299 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
11*18 - 1 = 197 (prime), 11*18 + 1 = 199 (prime).
MATHEMATICA
a=18; Select[Prime[Range[250]], PrimeQ[a*#-1]&&PrimeQ[a*#+1] &]
PROG
(Magma) [n: n in [0..10000] |IsPrime(n) and IsPrime(18*n-1)and IsPrime(18*n+1)] // Vincenzo Librandi, Aug 03 2010
(Python)
from sympy import isprime, primerange
def ok(p): return isprime(18*p-1) and isprime(18*p+1)
def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
print(aupto(6299)) # Michael S. Branicky, Nov 29 2021
CROSSREFS
Sequence in context: A304275 A031072 A193880 * A361484 A054692 A056256
KEYWORD
nonn
AUTHOR
STATUS
approved

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 April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)