OFFSET
0,22
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000
MATHEMATICA
MapAt[# + 1 &, #, 1] &@ FoldList[{#1~Join~IntegerDigits[#2, 2], #2} & @@ {First@ #1, SequenceCount[First@ #1, IntegerDigits[#2, 2]]} &, {{1}, 0}, Range@ 104][[All, -1]] (* Michael De Vlieger, Sep 30 2017 *)
PROG
Contribution from Franklin T. Adams-Watters, May 14 2010: (Start)
(PARI) inbase(n, b=10)=local(r); r=[n%b]; while((n\=b)>0, r=concat([n%b], r)); r
countsub(v, w)=local(r); r=max(#v-#w+1, 0); for(k=1, #v-#w+1, for(j=1, #w, if(v[k+j-1]!=w[j], r--; break))); r
al(n)=local(v, r, ni); v=r=[1]; for(k=1, n, ni=countsub(v, inbase(k, 2)); v=concat(v, inbase(ni, 2)); r=concat(r, [ni])); print(v); r
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Apr 20 2006
EXTENSIONS
More terms from Franklin T. Adams-Watters, May 14 2010
STATUS
approved