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!)
 A333325 Lexicographically earliest sequence over {0,1,2} that has the shortest square subsequence. 2
 0, 1, 0, 2, 0, 1, 0, 0, 1, 2, 0, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 1, 2, 0, 1, 0, 2, 0, 1, 2, 0, 2, 2, 0, 1, 0, 2, 0, 1, 2, 0, 0, 1, 0, 2, 0, 1, 0, 0, 1, 2, 0, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 1, 2, 0, 1, 0, 2, 0, 1, 2, 0, 2, 2, 0, 1, 0, 2, 0, 1, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS This is very similar to A333307.  See that sequence for details about the precise definition. - N. J. A. Sloane, Nov 29 2020 LINKS EXAMPLE a(7) = 0, since: 0 yields a square subsequence of length 2: [0, 0], 1 of length 4: [0, 1, 0, 1], 2 of length 8: [0, 1, 0, 2, 0, 1, 0, 2]. PROG (Python) def a333325(n):   seq = []   for k in range(n):     options = []     l = len(seq) + 1     for m in range(3): # base       for i in range(l // 2, -1, -1):         if seq[l - 2 * i: l - i] == seq[l - i:] + [m]: break       options.append(2 * i)     seq.append(options.index(min(options)))   return seq print(a333325(81)) CROSSREFS Cf. A006345, A157238, A283131, A007814. Sequence in context: A171774 A002324 A101671 * A078979 A063974 A144628 Adjacent sequences:  A333322 A333323 A333324 * A333326 A333327 A333328 KEYWORD nonn AUTHOR Jan Koornstra, Mar 15 2020 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 June 24 00:14 EDT 2021. Contains 345403 sequences. (Running on oeis4.)