login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A118275
a(0) = 1. a(n) is the number of times the binary representation of a(n-1) appears in the concatenated string of the terms a(0) through a(n-1) written in binary. (The concatenated string is written from left to right and each binary integer is written so the most significant 1 is on the left.)
2
1, 1, 2, 1, 4, 1, 6, 3, 6, 4, 2, 6, 5, 6, 6, 7, 6, 8, 1, 29, 6, 10, 5, 14, 8, 2, 20, 4, 6, 12, 2, 26, 6, 15, 6, 16, 1, 65, 1, 68, 1, 71, 2, 36, 2, 39, 2, 41, 5, 28, 2, 46, 3, 50, 3, 53, 5, 35, 3, 60, 3, 65, 2, 57, 4, 23, 12, 13, 22, 10
OFFSET
0,3
COMMENTS
Sequence A118274 is the string of terms of this sequence written in binary and concatenated.
LINKS
EXAMPLE
The string of concatenated binary representations of a(0) through a(7) is
11101100111011. Now a(7)= 3, which is 11 in binary. '11' occurs 6 times in the string (with, in this case, some binary digits in the string being used more than once). (The six '11's occur at {with position 1 on the left} positions 1, 2, 5, 9, 10 and 13.) So a(8) = 6. (And '1,1,0' is appended to the end of sequence A118274.)
MAPLE
with(StringTools): a[0]:=1: str:="1": pstr:="1":for n from 1 to 70 do a[n] := nops({SearchAll(pstr, str)}): pstr := convert(convert(a[n], binary), string): str := cat(str, pstr): printf("%d, ", a[n-1]):od: # Nathaniel Johnston, Apr 20 2011
CROSSREFS
Cf. A118274.
Sequence in context: A339602 A277127 A332792 * A328612 A243824 A146938
KEYWORD
easy,nonn,base
AUTHOR
Leroy Quet, Apr 21 2006
EXTENSIONS
a(14) - a(69) from Nathaniel Johnston, Apr 20 2011
STATUS
approved