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.

A065714 Number of 3's in decimal expansion of 2^n.

This page as a plain text file.
%I A065714 #29 Jul 09 2025 15:40:40
%S A065714 0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,0,3,0,1,1,1,1,1,0,1,
%T A065714 0,4,1,3,0,1,0,1,1,1,0,3,1,3,0,2,0,1,2,0,1,2,2,0,2,3,0,4,1,3,1,4,2,1,
%U A065714 1,1,2,3,2,3,1,2,4,1,4,3,0,3,2,3,4,4,3,3,2,1,3,0,0,4,2,2,6,1,4,4,2
%N A065714 Number of 3's in decimal expansion of 2^n.
%C A065714 I conjecture that any value x = 0, 1, 2, ... occurs only a finite number of times N(x) = 34, 34, 24, 34, 39, 34, 35, 34, 35, 32, 33, 31, ... in this sequence, for the last time at well defined indices i(x) = 153, 139, 226, 237, 308, 386, 413, 506, 461, 578, 644, 732, 857, 657, 743, 768, 784, 848, 906, ... - _M. F. Hasler_, Jul 09 2025
%H A065714 Harry J. Smith, <a href="/A065714/b065714.txt">Table of n, a(n) for n = 0..1000</a>
%e A065714 2^5 = 32 so a(5)=1.
%t A065714 Table[ Count[ IntegerDigits[2^n], 3], {n, 0, 100} ]
%o A065714 (PARI) a(n) = #select(x->(x==3), digits(2^n)); \\ _Michel Marcus_, Jun 15 2018
%o A065714 (Python)
%o A065714 def A065714(n):
%o A065714     return str(2**n).count('3') # _Chai Wah Wu_, Feb 14 2020
%Y A065714 Cf. A000079 (powers of 2), A035058 (2^n does not contain the digit 3).
%Y A065714 Similar for other digits: A027870 (0's), A065712 (1's), A065710 (2's), this (3's), A065715 (4's), A065716 (5's), A065717 (6's), A065718 (7's), A065719 (8's), A065744 (9's).
%Y A065714 Cf. A094776 (index of last occurrence of digit n in powers of 2).
%K A065714 nonn,base
%O A065714 0,26
%A A065714 _Benoit Cloitre_, Dec 04 2001
%E A065714 More terms from _Robert G. Wilson v_, Dec 07 2001