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.

This page as a plain text file.
%I A004642 #62 Feb 16 2025 08:32:28
%S A004642 1,2,11,22,121,1012,2101,11202,100111,200222,1101221,2210212,12121201,
%T A004642 102020102,211110211,1122221122,10022220021,20122210112,111022121001,
%U A004642 222122012002,1222021101011,10221112202022,21220002111121,120210012000012,1011120101000101,2100010202000202
%N A004642 Powers of 2 written in base 3.
%C A004642 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
%C A004642 Sloane (1973) conjectured a(n) always has a 0 between the most and least significant digits if n > 15 (see A102483 and A346497).
%C A004642 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
%D A004642 N. J. A. Sloane, The Persistence of a Number, J. Recr. Math. 6 (1973), 97-98.
%H A004642 Vincenzo Librandi, <a href="/A004642/b004642.txt">Table of n, a(n) for n = 0..1000</a>
%H A004642 Yagub N. Aliyev, <a href="https://doi.org/10.7546/nntdm.2023.29.3.474-485">Digits of powers of 2 in ternary numeral system</a>, Notes on Number Theory and Discrete Mathematics, Vol. 29, No. 3 (2023), 474-485.
%H A004642 Paul Erdős, <a href="https://www.jstor.org/stable/2689842">Some unconventional problems in number theory</a>, Mathematics Magazine, Vol. 52, No. 2 (1979), pp. 67-70.
%H A004642 Donald L. Kreher and Douglas R. Stinson, <a href="https://arxiv.org/abs/2401.07351">On min-base palindromic representations of powers of 2</a>, arXiv:2401.07351 [math.NT], 2024. See Table 4 p. 10.
%H A004642 Jeffrey C. Lagarias, <a href="https://doi.org/10.1112/jlms/jdn080">Ternary Expansions of Powers of 2</a>, Journal of the London Mathematical Society, Vol. 79, No. 3 (2009), pp. 562-588; <a href="https://arxiv.org/abs/math/0512006">arXiv preprint</a>, arXiv:math/0512006 [math.DS], 2005-2008.
%H A004642 Terry Tao, <a href="https://terrytao.wordpress.com/2011/08/25/the-collatz-conjecture-littlewood-offord-theory-and-powers-of-2-and-3/">The Collatz Conjecture, Littlewood-Offord theory, and powers of 2 and 3</a>, 2011.
%H A004642 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Ternary.html">Ternary</a>.
%t A004642 Table[FromDigits[IntegerDigits[2^n, 3]], {n, 25}] (* _Alonso del Arte_ Dec 11 2009 *)
%o A004642 (PARI) a(n)=fromdigits(digits(2^n,3)) \\ _M. F. Hasler_, Jun 23 2018
%o A004642 (Magma) [Seqint(Intseq(2^n, 3)): n in [0..30]]; // _G. C. Greubel_, Sep 10 2018
%Y A004642 Cf. A000079: powers of 2 written in base 10.
%Y A004642 Cf. A004643, ..., A004655: powers of 2 written in base 4, 5, ..., 16.
%Y A004642 Cf. A004656, A004658, A004659, ..., A004663: powers of 3 written in base 2, 4, 5, ..., 9.
%K A004642 nonn,base,easy
%O A004642 0,2
%A A004642 _N. J. A. Sloane_