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.

A037863 a(n) = (number of digits <=1) - (number of digits >1) in base 4 representation of n.

This page as a plain text file.
%I A037863 #14 Jan 27 2025 07:24:50
%S A037863 1,-1,-1,2,2,0,0,0,0,-2,-2,0,0,-2,-2,3,3,1,1,3,3,1,1,1,1,-1,-1,1,1,-1,
%T A037863 -1,1,1,-1,-1,1,1,-1,-1,-1,-1,-3,-3,-1,-1,-3,-3,1,1,-1,-1,1,1,-1,-1,
%U A037863 -1,-1,-3,-3,-1,-1,-3,-3,4,4,2,2,4,4,2,2,2,2,0,0
%N A037863 a(n) = (number of digits <=1) - (number of digits >1) in base 4 representation of n.
%F A037863 a(n) = A110591(n)-2*A139352(n). - _R. J. Mathar_, Jan 27 2025
%p A037863 A037863 := proc(n)
%p A037863     a := 0 ;
%p A037863     dgs := convert(n,base,4);
%p A037863     for i from 1 to nops(dgs) do
%p A037863         if op(i,dgs)<=1 then
%p A037863             a := a+1 ;
%p A037863         else
%p A037863             a := a-1 ;
%p A037863         end if;
%p A037863     end do:
%p A037863     a ;
%p A037863 end proc: # _R. J. Mathar_, Oct 16 2015
%o A037863 (PARI) a(n) = my(d=digits(n, 4)); #select(x->(x<=1), d) - #select(x->(x>1), d); \\ _Michel Marcus_, Jan 27 2025
%Y A037863 Cf. A110591, A139352.
%K A037863 base,sign
%O A037863 1,4
%A A037863 _Clark Kimberling_