A125855 Numbers k such that k+1, k+3, k+7 and k+9 are all primes.
4, 10, 100, 190, 820, 1480, 1870, 2080, 3250, 3460, 5650, 9430, 13000, 15640, 15730, 16060, 18040, 18910, 19420, 21010, 22270, 25300, 31720, 34840, 43780, 51340, 55330, 62980, 67210, 69490, 72220, 77260, 79690, 81040, 82720, 88810, 97840
Offset: 1
Keywords
Examples
For k = 10, the numbers 10 + 1 = 11, 10 + 3 = 13, 10 + 7 = 17, 10 + 9 = 19 are prime. - _Marius A. Burtea_, May 18 2019
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Programs
-
Haskell
a125855 n = a125855_list !! (n-1) a125855_list = map (pred . head) $ filter (all (== 1) . map a010051') $ iterate (zipWith (+) [1, 1, 1, 1]) [1, 3, 7, 9] -- Reinhard Zumkeller, Jul 18 2014
-
Magma
[n:n in [1..100000]| IsPrime(n+1) and IsPrime(n+3) and IsPrime(n+7) and IsPrime(n+9)]; // Marius A. Burtea, May 18 2019
-
Maple
a:=proc(n): if isprime(n+1)=true and isprime(n+3)=true and isprime(n+7)=true and isprime(n+9)=true then n else fi end: seq(a(n),n=1..500000); # Emeric Deutsch, Dec 24 2006
-
Mathematica
Do[If[(PrimeQ[x + 1]) && (PrimeQ[x + 3]) && (PrimeQ[x + 7]) && (PrimeQ[x + 9]), Print[x]], {x, 1, 10000}] (* Second program *) Select[Range[10^5], Times @@ Boole@ Map[PrimeQ, # + {1, 3, 7, 9}] == 1 &] (* Michael De Vlieger, Jun 12 2017 *) Select[Range[100000],AllTrue[#+{1,3,7,9},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 02 2018 *)
-
PARI
is(n) = my(v=[1, 3, 7, 9]); for(t=1, #v, if(!ispseudoprime(n+v[t]), return(0))); 1 \\ Felix Fröhlich, May 18 2019
Formula
a(n) = A007530(n) - 1. - R. J. Mathar, Jun 14 2017
Extensions
More terms from Emeric Deutsch, Dec 24 2006
Comments