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 #20 Dec 03 2021 15:34:44
%S 0,1,2,1,2,2,2,1,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,
%T 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,
%U 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
%N a(1) = 0; for n>1, a(n) = 1 if n is a power of 2, otherwise a(n) = 2.
%C This solves the Emissary puzzle.
%H Antti Karttunen, <a href="/A201219/b201219.txt">Table of n, a(n) for n = 1..16384</a>
%H <a href="http://www.msri.org/attachments/media/news/emissary/EmissaryFall2011.pdf">Puzzles Column</a>, Emissary, Fall 2011, page 9, puzzle 6.
%F a(1) = 0, for n > 1, a(n) = 2 - A209229(n). - _Antti Karttunen_, Nov 19 2017
%t Join[{0},Table[If[IntegerQ[Log2[n]],1,2],{n,2,200}]] (* _Harvey P. Dale_, Dec 03 2021 *)
%Y Cf. A043529, A209229.
%K nonn
%O 1,3
%A _N. J. A. Sloane_, Nov 28 2011