

A081706


Numbers n such that binary representation ends either in an odd number of ones followed by one zero or in an even number of ones.


21



2, 3, 10, 11, 14, 15, 18, 19, 26, 27, 34, 35, 42, 43, 46, 47, 50, 51, 58, 59, 62, 63, 66, 67, 74, 75, 78, 79, 82, 83, 90, 91, 98, 99, 106, 107, 110, 111, 114, 115, 122, 123, 130, 131, 138, 139, 142, 143, 146, 147, 154, 155, 162, 163, 170, 171, 174, 175, 178, 179, 186
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Values of k such that the Motzkin number A001006(k) is even. Values of k such that the number of restricted hexagonal polyominoes with k+1 cells (A002212) is even.
Or union of sequences {2*A079523(n)+k}, k=0,1. A generalization see in comment to A161639. [Vladimir Shevelev, Jun 15 2009]
Or intersection of sequences A121539 and {A121539(n)1}. A generalization see in comment to A161890. [Vladimir Shevelev, Jul 03 2009]
Also numbers n for which A010060(n+2) = A010060(n). [Vladimir Shevelev, Jul 06 2009]


LINKS

G. C. Greubel, Table of n, a(n) for n = 1..1000
J.P. Allouche, Thue, Combinatorics on words, and conjectures inspired by the ThueMorse sequence, arXiv:1401.3727 [math.NT], 2014.
J.P. Allouche, Thue, Combinatorics on words, and conjectures inspired by the ThueMorse sequence, J. de Théorie des Nombres de Bordeaux, 27, no. 2 (2015), 375388.
J.P. Allouche, Andre Arnold, Jean Berstel, Srecko Brlek, William Jockusch, Simon Plouffe and Bruce E. Sagan, A sequence related to that of ThueMorse, Discrete Math., 139 (1995), 455461.


FORMULA

a(2n1) = 2*A079523(n) = 4*A003159(n)2; a(2n) = 4*A003159(n)1.
Note that a(2n) = 1+a(2n1).


MATHEMATICA

(* m = MotzkinNumber *) m[0] = 1; m[n_] := m[n] = m[n  1] + Sum[m[k]*m[n  2  k], {k, 0, n  2}]; Select[Range[200], Mod[m[#], 2] == 0 &] (* JeanFrançois Alcover, Jul 10 2013 *)
Select[Range[200], EvenQ@Hypergeometric2F1[3/2, #, 3, 4]&] (* Vladimir Reshetnikov, Nov 02 2015 *)


PROG

(PARI) is(n)=valuation(bitor(n, 1)+1, 2)%2==0 \\ Charles R Greathouse IV, Mar 07 2013


CROSSREFS

Cf. A003159, A079523.
Sequence in context: A278742 A250174 A285622 * A032804 A248407 A047473
Adjacent sequences: A081703 A081704 A081705 * A081707 A081708 A081709


KEYWORD

nonn,base,easy


AUTHOR

Emeric Deutsch and Bruce E. Sagan, Apr 02 2003


STATUS

approved



