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!)
A215895 Primes p with property that there exists a number D such that p-3D, p-2D, p-D, p+D, p+2D, p+3D are all primes. 2

%I

%S 457,677,809,829,1039,1249,1453,1459,1511,1721,2083,2879,3203,3499,

%T 3527,3581,3919,4129,4139,4157,4273,4339,4549,5519,5689,5711,5843,

%U 6143,6329,6359,6619,6803,6949,7001,7013,7103,7109,7211,7393,7459,7477,7481,7549,7673,7723,7789

%N Primes p with property that there exists a number D such that p-3D, p-2D, p-D, p+D, p+2D, p+3D are all primes.

%C Conjecture: only 130633 primes are not in the sequence: 2, 3, ..., 94532497.

%H Alois P. Heinz and Lei Zhou, <a href="/A215895/b215895.txt">Table of n, a(n) for n = 1..10000</a> (terms n = 1..2000 from Alois P. Heinz)

%e 457 is in the sequence because with D=150: 7, 157, 307, 607, 757, 907 are all primes.

%p a:= proc(n) option remember; local D, p;

%p p:= `if`(n=1, 1, a(n-1));

%p do p:= nextprime(p);

%p for D to iquo(p, 3) do

%p if nops(select(isprime, {(p-k*D)$k=-3..3}))=7

%p then return p fi

%p od

%p od

%p end:

%p seq (a(n), n=1..40); # _Alois P. Heinz_, Aug 26 2012

%t a[n_] := a[n] = Module[{D, p}, p = If[n==1, 1, a[n-1]]; While[True, p = NextPrime[p]; For[D = 1, D <= Quotient[p, 3], D++, If[AllTrue[p - Range[-3, 3] D, PrimeQ], Return [p]]]]];

%t Array[a, 40] (* _Jean-Fran├žois Alcover_, Nov 13 2020, after _Alois P. Heinz_ *)

%Y Cf. A215642.

%K nonn

%O 1,1

%A _Alex Ratushnyak_, Aug 25 2012

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 May 21 09:30 EDT 2022. Contains 353908 sequences. (Running on oeis4.)