OFFSET
0,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..32767
PROG
(Scheme): (define (member_of_A209641? n) (let loop ((n n) (lev 0)) (cond ((zero? n) (zero? lev)) ((< lev 0) #f) ((even? n) (loop (/ n 2) (+ lev 1))) ((and (odd? (/ (-1+ n) 2)) (even? (/ (-1+ (/ (-1+ n) 2)) 2)) (not (zero? (/ (-1+ (/ (-1+ n) 2)) 2)))) #f) (else (loop (/ (- n 1) 2) (- lev 1))))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 24 2012
STATUS
approved