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.

A265209 Irregular triangle read by rows in which row n lists the base-3 digits of 2^n, n >= 0.

Original entry on oeis.org

1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 0, 1, 2, 2, 1, 0, 1, 1, 1, 2, 0, 2, 1, 0, 0, 1, 1, 1, 2, 0, 0, 2, 2, 2, 1, 1, 0, 1, 2, 2, 1, 2, 2, 1, 0, 2, 1, 2, 1, 2, 1, 2, 1, 2, 0, 1, 1, 0, 2, 0, 2, 0, 1, 0, 2, 2, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2
Offset: 0

Views

Author

L. Edson Jeffery, Dec 04 2015

Keywords

Comments

The length of row n is A020915(n) = 1 + A136409(n).

Examples

			Triangle begins:
  1
  2
  1  1
  2  2
  1  2  1
  1  0  1  2
  2  1  0  1
  1  1  2  0  2
  1  0  0  1  1  1
  2  0  0  2  2  2
  1  1  0  1  2  2  1
  2  2  1  0  2  1  2
  1  2  1  2  1  2  0  1
  1  0  2  0  2  0  1  0  2
  2  1  1  1  1  0  2  1  1
  1  1  2  2  2  2  1  1  2  2
		

Crossrefs

Cf. A000079 (powers of 2), A003137, A004642 (powers of 2 written in base 3).
Cf. A265210 (base 3 digits of 2^n in reverse order).

Programs

  • Mathematica
    (* Replace Flatten with Grid to display the triangle: *)
    Flatten[Table[IntegerDigits[2^n, 3], {n, 0, 15}]]
  • PARI
    for(n=0,15,for(k=1,#digits(2^n,3),print1(digits(2^n,3)[k],", "))) \\ Derek Orr, Dec 24 2015