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.

A199713 Smallest prime greater than n-th prime containing all of its digits in decimal representation.

Original entry on oeis.org

23, 13, 53, 17, 101, 31, 71, 109, 223, 229, 103, 73, 149, 347, 347, 353, 359, 163, 167, 107, 137, 97, 283, 389, 179, 1013, 1013, 701, 1009, 131, 271, 311, 173, 193, 419, 1051, 571, 613, 617, 317, 197, 811, 911, 1039, 719, 919, 1021, 1223, 2027, 1229, 2333
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 09 2011

Keywords

Examples

			   n |  a(n)  | prime(n)
-----+--------+---------
   1 |    23  |     2
   2 |    13  |     3
   3 |    53  |     5
   4 |    17  |     7
   5 |   101  |    11
   6 |    31  |    13
   7 |    71  |    17
   8 |   109  |    19
   9 |   223  |    23
  10 |   229  |    29
....
  26 |  1013  |   101
  27 |  1013  |   103
  28 |   701  |   107
  29 |  1009  |   109
  30 |   131  |   113
  31 |   271  |   127
  32 |   311  |   131 .
		

Crossrefs

Programs

  • Haskell
    a199713 n = f ps where
       f (q:qs) = if sort (show q) `contains` sort (show p) then q else f qs
       contains _  []                         = True
       contains [] _                          = False
       contains (u:us) vs'@(v:vs) | u == v    = contains us vs
                                  | otherwise = contains us vs'
       p : ps = drop (n-1) a000040_list