login
A126308
Delete '10'-substrings in the binary expansion of n.
2
0, 1, 0, 3, 0, 1, 1, 7, 0, 1, 0, 3, 2, 3, 3, 15, 0, 1, 0, 3, 0, 1, 1, 7, 4, 5, 1, 7, 6, 7, 7, 31, 0, 1, 0, 3, 0, 1, 1, 7, 0, 1, 0, 3, 2, 3, 3, 15, 8, 9, 2, 11, 2, 3, 3, 15, 12, 13, 3, 15, 14, 15, 15, 63, 0, 1, 0, 3, 0, 1, 1, 7, 0, 1, 0, 3, 2, 3, 3, 15, 0, 1, 0, 3, 0, 1, 1, 7, 4, 5, 1, 7, 6, 7, 7, 31
OFFSET
0,4
EXAMPLE
10 is 1010 in binary, thus it is rewritten to empty string, thus a(10)=0. 12 is 1100 in binary, thus it is rewritten to '10', so a(12)=2. 27 is 11011 in binary and when '10' is deleted, results 111, 7 in decimal, thus a(27)=7.
PROG
(Scheme:) (define (A126308 n) (cond ((zero? n) 0) ((= 2 (modulo n 4)) (A126308 (/ (- n 2) 4))) (else (+ (modulo n 2) (* 2 (A126308 (floor->exact (/ n 2))))))))
CROSSREFS
Sequence in context: A271023 A370041 A143624 * A370040 A094923 A331567
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jan 02 2007
STATUS
approved