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.

A160380 a(0) = 0; for n >= 1, a(n) = number of 0's in base-4 representation of n.

This page as a plain text file.
%I A160380 #35 Apr 26 2021 21:07:16
%S A160380 0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,1,1,1,1,0,0,0,1,0,0,0,1,0,0,0,2,1,
%T A160380 1,1,1,0,0,0,1,0,0,0,1,0,0,0,2,1,1,1,1,0,0,0,1,0,0,0,1,0,0,0,3,2,2,2,
%U A160380 2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,1,0,0,0,1,0,0,0,1,0,0,0,2,1,1,1,1,0,0,0,1
%N A160380 a(0) = 0; for n >= 1, a(n) = number of 0's in base-4 representation of n.
%C A160380 The base-4 representation of 0 is 0, and contains a single zero. - _N. J. A. Sloane_, Apr 26 2021
%H A160380 Reinhard Zumkeller, <a href="/A160380/b160380.txt">Table of n, a(n) for n = 0..10000</a>
%H A160380 F. T. Adams-Watters, F. Ruskey, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL12/Ruskey2/ruskey14.html">Generating Functions for the Digital Sum and Other Digit Counting Sequences</a>, JIS 12 (2009) 09.5.6
%F A160380 Recurrence relation: a(0) = 0, a(4m) = 1+a(m), a(4m+1) = a(4m+2) = a(4m+3) = a(m).
%F A160380 Generating function: (1/(1-z))*Sum_{m>=0} (z^(4^(m+1))*(1 - z^(4^m))/(1 - z^(4^(m+1)))).
%t A160380 Join[{0},Table[DigitCount[n,4,0],{n,110}]] (* _Harvey P. Dale_, Oct 18 2015 *)
%o A160380 (Haskell)
%o A160380 import Data.List (unfoldr)
%o A160380 a160380 = sum . map ((0 ^ ) . (`mod` 4)) .
%o A160380    unfoldr (\x -> if x == 0 then Nothing else Just (x, x `div` 4))
%o A160380 -- _Reinhard Zumkeller_, Apr 22 2011
%o A160380 (PARI) a(n) = #select(x->(x==0), digits(n, 4)); \\ _Michel Marcus_, Apr 26 2021
%Y A160380 Cf. A007090, A023416, A077267.
%K A160380 nonn,base,easy
%O A160380 0,17
%A A160380 _Frank Ruskey_, Jun 05 2009
%E A160380 Definition clarified by _Georg Fischer_, Apr 26 2021