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 #25 Jul 31 2017 07:01:09
%S 4,3,4,7,8,7,14,15,14,15,16,15,24,25,28,29,30,35,38,39,38,39,38
%N Consider the Post tag system defined in A284116; a(n) = maximum, taken over all binary words w of length n which terminate in a cycle, of the number of words in the orbit of w.
%C The terminating empty word is included in the count.
%e For length n=2, there are two words which cycle, 10 and 11:
%e 10 -> 101 -> 1101 -> 11101 -> 011101 -> 10100 -> 001101 -> 10100, which has entered a cycle.
%p # Uses procedures f1 and P from A289670.
%p # Count strings of length n which terminate and which cycle
%p # Print max length to reach empty word (mx)
%p mx:=[];
%p for n from 1 to 11 do
%p lprint("starting length ",n);
%p m:=0;
%p for n1 from 0 to 2^n-1 do
%p t1:=convert(2^n+n1,base,2); t2:=[seq(t1[i],i=1..n)];
%p map(x->convert(x,string),t2); t3:=Join(%,""); t4:=P(%);
%p if t4 <> 999 then if t4>m then m:=t4; fi; fi;
%p od;
%p mx:=[op(mx),m];
%p od:
%p mx;
%Y Cf. A284116, A284119, A284121, A289670, A289671, A289673, A289674, A289675.
%K nonn,more
%O 1,1
%A _N. J. A. Sloane_, Jul 29 2017
%E a(12)-a(23) from _Indranil Ghosh_, Jul 30 2017