The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A175687 a(0)=113, then a(n) = smallest prime p not already used such that the first three digits of p = the last three digits of a(n-1). 1
 113, 11311, 311, 3119, 1193, 193, 1931, 9311, 31121, 1213, 2131, 131, 1319, 3191, 191, 1913, 9133, 13309, 30911, 911, 91121, 1217, 2179, 179, 17903, 90313, 313, 3137, 137, 1373, 373, 3733, 733, 7331, 331, 3313, 31307, 307, 30703, 70309, 30931, 9319 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS Second-to-last (= third from right) digit of p is not allowed to be zero: e.g., after a(37)=307 we do not use 3079 because then next term must start with 079 which is not possible, hence a(38)=30703. LINKS Zak Seidov, Table of n,a(n) for n=0..1000 MATHEMATICA s={113}; id2={1, 1, 3}; Do[Do[p=Prime[k]; If[FreeQ[s, p], idp=IntegerDigits[p]; If[id2==Take[idp, 3]&&idp[[ -3]]>0, AppendTo[s, p]; id2=Take[idp, -3]; Break[]]], {k, 31, 10^7}], {1000}]; s CROSSREFS Cf. A175684. Sequence in context: A012031 A283781 A250052 * A090480 A187632 A218809 Adjacent sequences:  A175684 A175685 A175686 * A175688 A175689 A175690 KEYWORD base,nonn AUTHOR Zak Seidov, Aug 09 2010 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 7 18:13 EDT 2021. Contains 343652 sequences. (Running on oeis4.)