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.

A214213 Erroneous version of A005942.

This page as a plain text file.
%I A214213 #8 Apr 28 2020 09:21:43
%S A214213 1,2,4,6,2,12,16,4,6,24,28,32,36,8,10,12,14,48,52,56,60,64,68,72,76,
%T A214213 16,18,20,22,24,26,28,30,96,100,104,108,112,116,120,124,128,132,136,
%U A214213 140,144,148,152,156,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260,264
%N A214213 Erroneous version of A005942.
%H A214213 F. Mignosi, A. Restivo, M. Sciortino, <a href="http://dx.doi.org/10.1016/S0304-3975(00)00436-9">Words and forbidden factors</a>, WORDS (Rouen, 1999). Theoret. Comput. Sci. 273 (2002), no. 1-2, 99--117. MR1872445 (2002m:68096). Example 20, page 11, the complexity g_t(n) of the Thue-Morse word A010060. There is a typo in the fourth clause of the definition of g_t(n).
%H A214213 Included in accordance with the OEIS policy of including incorrect published sequences with pointers to the correct versions.
%p A214213 f:=proc(n) local m;
%p A214213 if n <= 2 then 2^n;
%p A214213 else m:=floor(log(n-1)/log(2))-1;
%p A214213      if n <= 3*2^m then 4*n-2^(m+1)-4;
%p A214213      else 2*n-2^(m+2)-2; # should have been 2*n+2^(m+2)-2
%p A214213      fi;
%p A214213 fi;
%p A214213 end;
%Y A214213 Cf. A005942.
%K A214213 dead
%O A214213 0,2
%A A214213 _N. J. A. Sloane_, Jul 10 2012