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!)
A165307 Minimum number n, not already present, that permits the cyclic repetition of the decimal digits 1,2,3,4,5,6,7,8,9 in the sequence. 9
1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 34, 56, 78, 91, 23, 45, 67, 89, 123, 456, 789, 1234, 567, 891, 234, 5678, 912, 345, 678, 9123, 4567, 8912, 3456, 7891, 2345, 6789, 12345, 67891, 23456, 78912, 34567, 89123, 45678, 91234, 56789, 123456, 789123, 456789, 1234567 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This sequence has a nice graph. - M. F. Hasler, Aug 16 2015
LINKS
EXAMPLE
Starting from 1,2,3,4,5,6,7,8,9 the next number is 12 because after 1,2,3,4,5,6,7,8,9 we must continue with a digit '1'. But 1 is already in the sequence so we need to append a 2, which yields 12. And so on.
MATHEMATICA
a = {1}; c = 0; Do[c = 10 c + Mod[n, 9] + 1; If[! MemberQ[a, c], AppendTo[a, c]; c = 0], {n, 160}]; a (* Ivan Neretin, Aug 14 2015 *)
PROG
(PARI) a(n, show=0, u=[], d=[1, 1])={my(s(d)=Strchr(vectorsmall(d[1], i, (d[2]-2+i)%9+49))); while(n--, show&&print1(s(d)", "); u=setunion(u, [d]); #u>9 && u[10]==[u[1][1]+1, 1] && u=u[10..-1]; d=(d[1]+d[2]-1)%9+1; for(nd=u[1][1], 9e9, if(!setsearch(u, [nd, d]), d=[nd, d]; next(2)))); eval(s(d))} \\ M. F. Hasler, Aug 16 2015
CROSSREFS
Cf. A081549 (strictly increasing version).
Sequence in context: A290386 A290388 A302504 * A081549 A085889 A342951
KEYWORD
easy,nonn,base,look
AUTHOR
EXTENSIONS
Edited by Charles R Greathouse IV, Aug 03 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 April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)