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.
%I A273943 #27 Feb 22 2020 20:57:36 %S A273943 0,1,1,2,2,2,3,1,4,1,5,1,6,1,7,1,8,1,9,1,10,1,11,4,12,2,13,1,14,3,15, %T A273943 2,16,2,17,2,18,2,19,2,20,1,21,6,22,5,23,2,24,1,25,2,26,1,27,1,28,1, %U A273943 29,1,30,1,31,4,32,2,33,1,34,1,35,1,36,1,37,1,38,1,39,1,40,1,41,5,42,1,43,3,44,1,45,1,46,1,47,1,48,1,49,1,50,1,51,4,52,4,53,1,54,2 %N A273943 Put and say how often: a(n) = n/2 if n is even, else a(n) = number of matches of "a(n-1)" in the concatenation of all "a(i)" with i < n, where "x" denotes the decimal string of x. %C A273943 Inspired by Look-and-Say sequences. %H A273943 Rainer Rosenthal, <a href="/A273943/b273943.txt">Table of n, a(n) for n = 0..106473</a> %e A273943 a(4) = 2 by definition and a(5) = 2 because "2" appears twice in the string built from the first 5 entries, i.e. "01122". %e A273943 Nice question: how to continue 0112223141516171819110111? Answer: 4, since 11 was put last and there are 4 occurrences of 11 so far. %p A273943 rev:=proc(f)local i,fr;fr:=[];for i to nops(f) do fr:=[op(fr),f[-i]]od;return fr;end:mc := z->`if`(z=0,[0],rev(convert(z,base,10))): %p A273943 matches := proc(f,z)local i,t,cnt;t:=mc(z);cnt:=0;for i to nops(f)+1-nops(t)do if f[i..i+nops(t)-1]=t then cnt := cnt+1;fi;od;return cnt;end: %p A273943 addZ := proc(f,z)local t;t:=mc(z);return[op(f),op(t)];end: %p A273943 s:=[]:a:=[]:for i from 0 to 54 do s:=addZ(s,i);m:=matches(s,i);s:=addZ(s,m);a:=[op(a),i,m];od:seq(a[i+1],i=0..109); %Y A273943 Cf. A005150, A225212. %Y A273943 See A274013 for bisection a(2k+1). %K A273943 nonn,base,easy %O A273943 0,4 %A A273943 _Rainer Rosenthal_, Jun 05 2016