login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)