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.

A215883 When written in base 4, n ends in a(n) consecutive nonzero digits.

This page as a plain text file.
%I A215883 #10 Sep 26 2013 01:04:21
%S A215883 0,1,1,1,0,2,2,2,0,2,2,2,0,2,2,2,0,1,1,1,0,3,3,3,0,3,3,3,0,3,3,3,0,1,
%T A215883 1,1,0,3,3,3,0,3,3,3,0,3,3,3,0,1,1,1,0,3,3,3,0,3,3,3,0,3,3,3,0,1,1,1,
%U A215883 0,2,2,2,0,2,2,2,0,2,2,2,0,1,1,1,0,4,4
%N A215883 When written in base 4, n ends in a(n) consecutive nonzero digits.
%C A215883 Sequences A215879, A215884 and A215887 are the base 3, 5 and 10 analog, while the base 2 analog of this sequence coincides (up to a shift in the index) with the 2-adic valuation A007814, see comments there.
%F A215883 a(4^(t+1)*k+m) = t  for  4^t > m > 4^(t-1).
%e A215883 The numbers 0,1,2,3,4,5,6,7 are written in base 4 as 0,1,2,3,10,11,12,13 and thus end in a(0..7)=0,1,1,1,0,2,2,2 nonzero digits.
%o A215883 (PARI) a(n,b=4)=n=divrem(n,b); for(c=0,9e9,n[2]||return(c); n=divrem(n[1],b))
%o A215883 (PARI) a(n)=my(k);while(n%4,n>>=2;k++);k \\ _Charles R Greathouse IV_, Sep 26 2013
%K A215883 nonn,base
%O A215883 0,6
%A A215883 _M. F. Hasler_, Aug 25 2012