|
|
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.
|
|
23
|
|
|
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.
The asymptotic density of this sequence is 1/3 (Rowland and Yassawi, 2015; Burns, 2016). - Amiram Eldar, Jan 30 2021
Numbers of the form 4^k*(2*n-1)-2 and 4^k*(2*n-1)-1 where n and k are positive integers. - Michael Somos, Oct 22 2021
|
|
LINKS
|
Jean-Paul Allouche, André Arnold, Jean Berstel, Srećko Brlek, William Jockusch, Simon Plouffe and Bruce E. Sagan, A sequence related to that of Thue-Morse, Discrete Math., Vol. 139, No. 1-3 (1995), pp. 455-461.
|
|
FORMULA
|
Note that a(2n) = 1+a(2n-1).
|
|
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 &] (* Jean-François Alcover, Jul 10 2013 *)
|
|
PROG
|
(Python)
from itertools import count, islice
def A081706_gen(): # generator of terms
for n in count(0):
if (n&-n).bit_length()&1:
m = n<<2
yield m-2
yield m-1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|