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.

A030386 Triangle T(n,k): write n in base 4, reverse order of digits.

This page as a plain text file.
%I A030386 #30 Nov 28 2017 11:36:28
%S A030386 0,1,2,3,0,1,1,1,2,1,3,1,0,2,1,2,2,2,3,2,0,3,1,3,2,3,3,3,0,0,1,1,0,1,
%T A030386 2,0,1,3,0,1,0,1,1,1,1,1,2,1,1,3,1,1,0,2,1,1,2,1,2,2,1,3,2,1,0,3,1,1,
%U A030386 3,1,2,3,1,3,3,1,0,0,2,1,0,2,2,0,2,3,0,2,0,1,2
%N A030386 Triangle T(n,k): write n in base 4, reverse order of digits.
%H A030386 Reinhard Zumkeller, <a href="/A030386/b030386.txt">Rows n = 0..1000 of triangle, flattened</a>
%e A030386 Triangle begins:
%e A030386 0
%e A030386 1
%e A030386 2
%e A030386 3
%e A030386 0, 1
%e A030386 1, 1
%e A030386 2, 1
%e A030386 3, 1
%e A030386 0, 2
%e A030386 1, 2
%e A030386 2, 2
%e A030386 3, 2
%e A030386 0, 3
%e A030386 1, 3
%e A030386 2, 3
%e A030386 3, 3
%e A030386 0, 0, 1
%e A030386 1, 0, 1 ... - _Philippe Deléham_, Oct 20 2011
%p A030386 A030386_row := n -> op(convert(n, base, 4)):
%p A030386 seq(A030386_row(n), n=0..36); # _Peter Luschny_, Nov 28 2017
%t A030386 Flatten[Table[Reverse[IntegerDigits[n,4]],{n,0,50}]] (* _Harvey P. Dale_, Oct 13 2012 *)
%o A030386 (PARI) A030386(n, k=-1)=/*k<0&&error("Flattened sequence not yet implemented.")*/n\4^k%4 \\ Assuming that columns are numbered starting with k=0 as in A030308, A030341, ... \\ _M. F. Hasler_, Jul 21 2013
%o A030386 (Haskell)
%o A030386 a030386 n k = a030386_tabf !! n !! k
%o A030386 a030386_row n = a030386_tabf !! n
%o A030386 a030386_tabf = iterate succ [0] where
%o A030386    succ []     = [1]
%o A030386    succ (3:ts) = 0 : succ ts
%o A030386    succ (t:ts) = (t + 1) : ts
%o A030386 -- _Reinhard Zumkeller_, Sep 18 2015
%Y A030386 Cf. A030308, A030341, A031235, A030567, A031007, A031045, A031087, A031298 for the base-2 to base-10 analogs.
%Y A030386 Cf. A007090.
%K A030386 nonn,base,tabf,less
%O A030386 0,3
%A A030386 _Clark Kimberling_
%E A030386 Initial 0 and better name by _Philippe Deléham_, Oct 20 2011