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.

A173970 Primes p such that 2*p-NextPrime are prime numbers.

Original entry on oeis.org

5, 7, 23, 47, 53, 73, 157, 173, 211, 233, 257, 263, 353, 373, 563, 593, 607, 619, 647, 653, 733, 947, 977, 1069, 1097, 1103, 1123, 1187, 1223, 1283, 1367, 1433, 1453, 1459, 1493, 1499, 1511, 1613, 1709, 1747, 1753, 1759, 1789, 1889, 1907, 2099, 2161, 2287
Offset: 1

Views

Author

Keywords

Comments

2*5-7=3, 2*7-11=3, 2*23-29=17,..

Programs

  • Magma
    [p:p in PrimesUpTo(2500)| IsPrime(2*p-NextPrime(p))]; // Marius A. Burtea, Jul 03 2019
  • Maple
    P:= select(isprime, [2,seq(i,i=1..10000,2)]):
    Q:= 2*P[1..-2]-P[2..-1]:
    P[select(t -> isprime(Q[t]),[$1..nops(Q)])]; # Robert Israel, Jul 03 2019
  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[2*p-Prime[n+1]],AppendTo[lst,p]],{n,6!}];lst
    Select[Prime[Range[400]],PrimeQ[2#-NextPrime[#]]&] (* Harvey P. Dale, May 04 2021 *)