A201219 a(1) = 0; for n>1, a(n) = 1 if n is a power of 2, otherwise a(n) = 2.
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, 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, 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
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..16384
- Puzzles Column, Emissary, Fall 2011, page 9, puzzle 6.
Programs
-
Mathematica
Join[{0},Table[If[IntegerQ[Log2[n]],1,2],{n,2,200}]] (* Harvey P. Dale, Dec 03 2021 *)
Formula
a(1) = 0, for n > 1, a(n) = 2 - A209229(n). - Antti Karttunen, Nov 19 2017
Comments