The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A030341 Triangle T(n,k): write n in base 3, reverse order of digits. 45
 0, 1, 2, 0, 1, 1, 1, 2, 1, 0, 2, 1, 2, 2, 2, 0, 0, 1, 1, 0, 1, 2, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 0, 2, 1, 1, 2, 1, 2, 2, 1, 0, 0, 2, 1, 0, 2, 2, 0, 2, 0, 1, 2, 1, 1, 2, 2, 1, 2, 0, 2, 2, 1, 2, 2, 2, 2, 2, 0, 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS Reinhard Zumkeller, Rows n = 0..1000 of triangle, flattened Eric Weisstein's World of Mathematics, Ternary. Wikipedia, Ternary numeral system EXAMPLE Triangle begins : 0 1 2 0, 1 1, 1 2, 1 0, 2 1, 2 2, 2 0, 0, 1 1, 0, 1 2, 0, 1 0, 1, 1 1, 1, 1 2, 1, 1 ... MAPLE A030341_row := n -> op(convert(n, base, 3)): seq(A030341_row(n), n=0..32); # Peter Luschny, Nov 28 2017 MATHEMATICA Flatten[Table[Reverse[IntegerDigits[n, 3]], {n, 0, 40}]] (* Harvey P. Dale, Oct 20 2014 *) PROG (Haskell) a030341 n k = a030341_tabf !! n !! k a030341_row n = a030341_tabf !! n a030341_tabf = iterate succ [0] where    succ []     = [1]    succ (2:ts) = 0 : succ ts    succ (t:ts) = (t + 1) : ts -- Reinhard Zumkeller, Feb 21 2013 (PARI) A030341(n, k=-1)=/*k<0&&error("Flattened sequence not yet implemented.")*/n\3^k%3 \\ Assuming that columns are numbered starting with k=0 as in A030308, A030567 and others. - M. F. Hasler, Jul 21 2013 CROSSREFS Cf. A081604 (row lengths), A053735 (row sums), A007089, A003137. Cf. A030308, A030386, A031235, A030567, A031007, A031045, A031087, A031298 for the base-2 to base-10 analogs. Sequence in context: A280634 A281491 A099494 * A258832 A121444 A118230 Adjacent sequences:  A030338 A030339 A030340 * A030342 A030343 A030344 KEYWORD nonn,base,tabf,less AUTHOR EXTENSIONS Initial 0 and better name by Philippe Deléham, Oct 20 2011 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 10 11:35 EDT 2021. Contains 342845 sequences. (Running on oeis4.)