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.

This page as a plain text file.
%I A199713 #12 Jan 29 2014 07:50:11
%S A199713 23,13,53,17,101,31,71,109,223,229,103,73,149,347,347,353,359,163,167,
%T A199713 107,137,97,283,389,179,1013,1013,701,1009,131,271,311,173,193,419,
%U A199713 1051,571,613,617,317,197,811,911,1039,719,919,1021,1223,2027,1229,2333
%N A199713 Smallest prime greater than n-th prime containing all of its digits in decimal representation.
%H A199713 Reinhard Zumkeller, <a href="/A199713/b199713.txt">Table of n, a(n) for n = 1..10000</a>
%e A199713    n |  a(n)  | prime(n)
%e A199713 -----+--------+---------
%e A199713    1 |    23  |     2
%e A199713    2 |    13  |     3
%e A199713    3 |    53  |     5
%e A199713    4 |    17  |     7
%e A199713    5 |   101  |    11
%e A199713    6 |    31  |    13
%e A199713    7 |    71  |    17
%e A199713    8 |   109  |    19
%e A199713    9 |   223  |    23
%e A199713   10 |   229  |    29
%e A199713 ....
%e A199713   26 |  1013  |   101
%e A199713   27 |  1013  |   103
%e A199713   28 |   701  |   107
%e A199713   29 |  1009  |   109
%e A199713   30 |   131  |   113
%e A199713   31 |   271  |   127
%e A199713   32 |   311  |   131 .
%o A199713 (Haskell)
%o A199713 a199713 n = f ps where
%o A199713    f (q:qs) = if sort (show q) `contains` sort (show p) then q else f qs
%o A199713    contains _  []                         = True
%o A199713    contains [] _                          = False
%o A199713    contains (u:us) vs'@(v:vs) | u == v    = contains us vs
%o A199713                               | otherwise = contains us vs'
%o A199713    p : ps = drop (n-1) a000040_list
%Y A199713 Cf. A000040, A055387.
%K A199713 nonn,base,look
%O A199713 1,1
%A A199713 _Reinhard Zumkeller_, Nov 09 2011