The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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
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: A283781 A350054 A250052 * A090480 A187632 A218809
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 01:24 EDT 2024. Contains 372720 sequences. (Running on oeis4.)