%I
%S 1,2,4,5,9,14,16,17,21,30,35,40,44,49,63,64,80,97,106,115,120,141,146,
%T 151,155,164,169,174,188,202,232,233,249,265,282,317,326,335,344,353,
%U 393,402,423,444,488,493,507,512,528,577,586,595,600,621,626,631,645
%N a(0)=1. a(n) = a(n1) + (the largest value among (a(0),a(1),...a(n1)) that when written in binary occurs as a substring in the binary representation of n).
%H Robert G. Wilson v, <a href="/A162406/b162406.txt">Table of n, a(n) for n = 0..1000</a>. [From _Robert G. Wilson v_, Aug 01 2009]
%t a[0] = 1; a[n_] := a[n] = a[n  1] + Max@ Select[ Table[ a@i, {i, 0, n  1}], StringPosition[ ToString@ FromDigits@ IntegerDigits[n, 2], ToString@ FromDigits@ IntegerDigits[ #, 2]] != {} &]; Table[ a@n, {n, 0, 53}] (* _Robert G. Wilson v_, Aug 01 2009 *)
%Y Cf. A162404, A162407.
%K base,nonn
%O 0,2
%A _Leroy Quet_, Jul 02 2009
%E More terms beginning with a(12) from _Robert G. Wilson v_, Aug 01 2009
