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.

A069686 Primes whose internal digits form a prime.

Original entry on oeis.org

127, 131, 137, 139, 151, 157, 173, 179, 223, 227, 229, 233, 239, 251, 257, 271, 277, 331, 337, 353, 359, 373, 379, 421, 431, 433, 439, 457, 479, 521, 523, 557, 571, 577, 631, 653, 659, 673, 677, 727, 733, 739, 751, 757, 773, 821, 823, 827, 829, 839, 853
Offset: 1

Views

Author

Amarnath Murthy, Nov 05 2002

Keywords

Comments

Primes that remain prime upon deleting the first and last digits.

Crossrefs

Programs

  • Mathematica
    Select[Range[100, 853], PrimeQ[#] && PrimeQ[FromDigits[Rest[Most[IntegerDigits[#]]]]] &] (* T. D. Noe, Apr 05 2013 *)
  • PARI
    {indigs(n)=local(j,a,d); n=n\10; j=1; a=0; while(n>10,d=divrem(n,10); n=d[1]; a=a+j*d[2]; j=10*j); a}
    forprime(p=1,855,if(isprime(indigs(p)),print1(p,","))) \\ Klaus Brockhaus, Nov 06 2002
    
  • Python
    from sympy import isprime
    for p in filter(isprime, range(100, 855)):
        if isprime(int(str(p)[1:-1])): print(p) # Jason Yuen, Mar 28 2024

Extensions

Edited and extended by Klaus Brockhaus, Nov 06 2002
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 21 2007