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.

A334227 Length of the shortest prefix of the Thue-Morse sequence (A010060) containing, as subwords, all length-n blocks appearing in A010060.

Original entry on oeis.org

0, 2, 7, 8, 15, 16, 29, 30, 31, 32, 57, 58, 59, 60, 61, 62, 63, 64, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246
Offset: 0

Views

Author

Jeffrey Shallit, Apr 19 2020

Keywords

Examples

			For n = 3 the length-8 prefix 01101001 contains all length-3 subwords appearing in Thue-Morse, namely, {011,110,101,010,100,001}, and no shorter prefix works.
		

Crossrefs

Cf. A010060.

Programs

  • PARI
    a(n)=if(n<3, [0,2,7][n+1], my(i=exponent(n),N=1<>=1; j=n-N); 7*N+j-1) \\ Charles R Greathouse IV, Apr 30 2020

Formula

a(0) = 0, a(1) = 2, a(2) = 7, and a(2^i + j) = 7*2^i + j-1 for i >= 0 and 2 <= j <= 2^i + 1.