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.

A012884 Numbers such that every prefix and suffix is 1 or a prime.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 23, 31, 37, 53, 71, 73, 113, 131, 137, 173, 197, 311, 313, 317, 373, 797, 1373, 1997, 3137, 3797, 7331, 73331, 739397
Offset: 1

Views

Author

Larry Calmer (larry(AT)wri.com), Simon Plouffe

Keywords

Comments

Last term is 739397 (confirmed by David W. Wilson).
Intersection of A012883 and A143390. [Reinhard Zumkeller, Aug 13 2008]

Crossrefs

Cf. A068669.

Programs

  • Mathematica
    prQ[n_] := n == 1 || PrimeQ[n];
    okQ[n_] := Module[{dd, nd}, dd = IntegerDigits[n]; nd = Length[dd]; AllTrue[Range[nd], prQ@ FromDigits@ Take[dd, #]&] && AllTrue[Range[nd-1], prQ@ FromDigits@ Drop[dd, #]&]];
    {1}~Join~Select[Prime@Range[60000], okQ] (* Jean-François Alcover, Nov 20 2019 *)