OFFSET
0
LINKS
FORMULA
EXAMPLE
Drawing the terms as a binary tree (the first six levels shown) helps in seeing where terms of A028982 (squares and twice squares) are located in Doudna-tree (A005940, at the positions where 1's occur here):
1
|
1
............../ \..............
0 1
....../ \...... ....../ \......
0 0 1 1
/ \ / \ / \ / \
/ \ / \ / \ / \
0 0 0 0 1 1 0 1
/ \ / \ / \ / \ / \ / \ / \ / \
0 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1
MATHEMATICA
Array[Boole@ NoneTrue[Partition[PadRight[#, # + Boole[OddQ@ #] &@ Length@ #, ""] /. _?StringQ -> {0, 0}, 2, 2][[All, All, -1]] &@ Map[{First@ #, Length@ #} &, Split@ IntegerDigits[#, 2]], And[OddQ@ #1, #2 > 0] & @@ # &] &, 120, 0] (* Michael De Vlieger, Dec 02 2017 *)
PROG
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Dec 01 2017
STATUS
approved