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.

Showing 1-1 of 1 results.

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.

Original entry on oeis.org

457, 677, 809, 829, 1039, 1249, 1453, 1459, 1511, 1721, 2083, 2879, 3203, 3499, 3527, 3581, 3919, 4129, 4139, 4157, 4273, 4339, 4549, 5519, 5689, 5711, 5843, 6143, 6329, 6359, 6619, 6803, 6949, 7001, 7013, 7103, 7109, 7211, 7393, 7459, 7477, 7481, 7549, 7673, 7723, 7789
Offset: 1

Views

Author

Alex Ratushnyak, Aug 25 2012

Keywords

Comments

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

Examples

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

Crossrefs

Cf. A215642.

Programs

  • Maple
    a:= proc(n) option remember; local D, p;
          p:= `if`(n=1, 1, a(n-1));
          do p:= nextprime(p);
            for D to iquo(p, 3) do
              if nops(select(isprime, {(p-k*D)$k=-3..3}))=7
              then return p fi
            od
          od
        end:
    seq (a(n), n=1..40);  # Alois P. Heinz, Aug 26 2012
  • Mathematica
    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]]]]];
    Array[a, 40] (* Jean-François Alcover, Nov 13 2020, after Alois P. Heinz *)
Showing 1-1 of 1 results.