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.

This page as a plain text file.
%I A334227 #13 Mar 21 2025 21:58:30
%S A334227 0,2,7,8,15,16,29,30,31,32,57,58,59,60,61,62,63,64,113,114,115,116,
%T A334227 117,118,119,120,121,122,123,124,125,126,127,128,225,226,227,228,229,
%U A334227 230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246
%N A334227 Length of the shortest prefix of the Thue-Morse sequence (A010060) containing, as subwords, all length-n blocks appearing in A010060.
%F A334227 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.
%e A334227 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.
%o A334227 (PARI) a(n)=if(n<3, [0,2,7][n+1], my(i=exponent(n),N=1<<i,j=n-N); if(j<2, N>>=1; j=n-N); 7*N+j-1) \\ _Charles R Greathouse IV_, Apr 30 2020
%Y A334227 Cf. A010060.
%K A334227 nonn,easy
%O A334227 0,2
%A A334227 _Jeffrey Shallit_, Apr 19 2020