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.

A004642 Powers of 2 written in base 3.

Original entry on oeis.org

1, 2, 11, 22, 121, 1012, 2101, 11202, 100111, 200222, 1101221, 2210212, 12121201, 102020102, 211110211, 1122221122, 10022220021, 20122210112, 111022121001, 222122012002, 1222021101011, 10221112202022, 21220002111121, 120210012000012, 1011120101000101, 2100010202000202
Offset: 0

Views

Author

Keywords

Comments

When n is odd, a(n) ends in 1, and when n is even, a(n) ends in 2, since 2^n is congruent to 1 mod 3 when n is odd and to 2 mod 3 when n is even. - Alonso del Arte Dec 11 2009
Sloane (1973) conjectured a(n) always has a 0 between the most and least significant digits if n > 15 (see A102483 and A346497).
Erdős (1978) conjectured that for n > 8 a(n) has at least one 2 (see link to Terry Tao's blog). - Dmitry Kamenetsky, Jan 10 2017

References

  • N. J. A. Sloane, The Persistence of a Number, J. Recr. Math. 6 (1973), 97-98.

Crossrefs

Cf. A000079: powers of 2 written in base 10.
Cf. A004643, ..., A004655: powers of 2 written in base 4, 5, ..., 16.
Cf. A004656, A004658, A004659, ..., A004663: powers of 3 written in base 2, 4, 5, ..., 9.

Programs

  • Magma
    [Seqint(Intseq(2^n, 3)): n in [0..30]]; // G. C. Greubel, Sep 10 2018
  • Mathematica
    Table[FromDigits[IntegerDigits[2^n, 3]], {n, 25}] (* Alonso del Arte Dec 11 2009 *)
  • PARI
    a(n)=fromdigits(digits(2^n,3)) \\ M. F. Hasler, Jun 23 2018