cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A215895 #18 Nov 14 2020 07:06:15
%S A215895 457,677,809,829,1039,1249,1453,1459,1511,1721,2083,2879,3203,3499,
%T A215895 3527,3581,3919,4129,4139,4157,4273,4339,4549,5519,5689,5711,5843,
%U A215895 6143,6329,6359,6619,6803,6949,7001,7013,7103,7109,7211,7393,7459,7477,7481,7549,7673,7723,7789
%N 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.
%C A215895 Conjecture: only 130633 primes are not in the sequence: 2, 3, ..., 94532497.
%H A215895 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 A215895 457 is in the sequence because with D=150: 7, 157, 307, 607, 757, 907 are all primes.
%p A215895 a:= proc(n) option remember; local D, p;
%p A215895       p:= `if`(n=1, 1, a(n-1));
%p A215895       do p:= nextprime(p);
%p A215895         for D to iquo(p, 3) do
%p A215895           if nops(select(isprime, {(p-k*D)$k=-3..3}))=7
%p A215895           then return p fi
%p A215895         od
%p A215895       od
%p A215895     end:
%p A215895 seq (a(n), n=1..40);  # _Alois P. Heinz_, Aug 26 2012
%t A215895 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 A215895 Array[a, 40] (* _Jean-François Alcover_, Nov 13 2020, after _Alois P. Heinz_ *)
%Y A215895 Cf. A215642.
%K A215895 nonn
%O A215895 1,1
%A A215895 _Alex Ratushnyak_, Aug 25 2012