login
A295895
Parity of the binary weight of the contents of node n in Doudna-tree (A005940).
6
1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1
OFFSET
0
FORMULA
a(n) = A000035(A295894(n)) = A010060(A005940(1+n)).
a(0) = 1; after which, a(2n+1) = a(n), a(2n) = a(n) + A295893(n) mod 2.
a(n) = A295875(n) + A295896(n) mod 2.
If n is even and A295896(n) = 1 [i.e., when n is even and A005940(1+n) is a square], then a(n) = A010059(A292602(n)).
EXAMPLE
The first six levels of the binary tree (compare also to the illustrations given at A005940, A295894 and A295875):
1
|
1
............../ \..............
0 1
....../ \...... ....../ \......
0 0 0 1
/ \ / \ / \ / \
/ \ / \ / \ / \
1 0 0 0 1 0 0 1
/ \ / \ / \ / \ / \ / \ / \ / \
1 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1
PROG
(Scheme) (definec (A295895 n) (cond ((zero? n) 1) ((odd? n) (A295895 (/ (- n 1) 2))) (else (A000035 (+ (A295893 (/ n 2)) (A295895 (/ n 2)))))))
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 30 2017
STATUS
approved