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”).
%I #14 Sep 03 2017 11:29:55
%S 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,
%T 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,
%U 3,60,3,65,2,57,4,23,12,13,22,10
%N 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.)
%C Sequence A118274 is the string of terms of this sequence written in binary and concatenated.
%H Nathaniel Johnston, <a href="/A118275/b118275.txt">Table of n, a(n) for n = 0..10000</a>
%e The string of concatenated binary representations of a(0) through a(7) is
%e 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.)
%p 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
%Y Cf. A118274.
%K easy,nonn,base
%O 0,3
%A _Leroy Quet_, Apr 21 2006
%E a(14) - a(69) from _Nathaniel Johnston_, Apr 20 2011