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.

A050806 Inserting any digit between adjacent digits of prime p produces exactly 1 new prime.

Original entry on oeis.org

101, 149, 163, 241, 269, 271, 317, 347, 367, 397, 409, 419, 443, 487, 509, 541, 587, 601, 641, 761, 787, 811, 821, 863, 907, 919, 1439, 1481, 1663, 1877, 2089, 2111, 2579, 2593, 2671, 2819, 2971, 3121, 3457, 3463, 3571, 3643, 3659, 3769, 3917, 4001
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1999

Keywords

Examples

			101 yields only one prime using digit '6' -> 1(6)0(6)1 -> prime 16061.
		

Crossrefs

Programs

  • Haskell
    import Data.List (intersperse)
    a050806 n = a050806_list !! (n-1)
    a050806_list = filter ((== 1) . sum . f) a000040_list where
       f p = map (i $ show p) "0123456789"
       i ps d = a010051' (read $ intersperse d ps :: Integer)
    -- Reinhard Zumkeller, May 07 2013
  • Mathematica
    aQ[n_]:=Plus@@Boole[PrimeQ[Table[FromDigits[Riffle[IntegerDigits[n],k]],{k,0,9}]]]==1; Select[Prime[Range[5,555]],aQ[#]&] (* Jayanta Basu, May 30 2013 *)

Extensions

Offset corrected by Reinhard Zumkeller, May 07 2013