login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A162406 a(0)=1. a(n) = a(n-1) + (the largest value among (a(0),a(1),...a(n-1)) that when written in binary occurs as a substring in the binary representation of n). 3
1, 2, 4, 5, 9, 14, 16, 17, 21, 30, 35, 40, 44, 49, 63, 64, 80, 97, 106, 115, 120, 141, 146, 151, 155, 164, 169, 174, 188, 202, 232, 233, 249, 265, 282, 317, 326, 335, 344, 353, 393, 402, 423, 444, 488, 493, 507, 512, 528, 577, 586, 595, 600, 621, 626, 631, 645 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 0..1000. [From Robert G. Wilson v, Aug 01 2009]
MATHEMATICA
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 *)
CROSSREFS
Sequence in context: A234588 A118550 A126697 * A129282 A073153 A073154
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jul 02 2009
EXTENSIONS
More terms beginning with a(12) from Robert G. Wilson v, Aug 01 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 4 03:49 EDT 2024. Contains 372225 sequences. (Running on oeis4.)