cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A126308 Delete '10'-substrings in the binary expansion of n.

This page as a plain text file.
%I A126308 #6 Jul 24 2025 19:10:29
%S A126308 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,
%T A126308 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,
%U A126308 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
%N A126308 Delete '10'-substrings in the binary expansion of n.
%e A126308 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.
%o A126308 (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))))))))
%Y A126308 A126309 = A080300(a(A014486(n))). Cf. A080303.
%K A126308 nonn,base
%O A126308 0,4
%A A126308 _Antti Karttunen_, Jan 02 2007