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.
%I A065715 #26 Dec 05 2024 18:55:58 %S A065715 0,0,1,0,0,0,1,0,0,0,1,1,1,0,1,0,0,0,2,1,1,0,3,0,0,2,1,1,2,0,2,3,2,1, %T A065715 1,1,1,2,3,1,0,0,3,0,3,1,3,2,2,2,2,1,2,2,3,0,1,2,2,3,2,1,3,1,4,3,3,2, %U A065715 1,0,3,4,3,4,4,0,2,2,4,3,2,3,4,3,2,0,2,4,3,3,4,5,3,2,3,1,3,1,3,3,2 %N A065715 Number of 4's in decimal expansion of 2^n. %C A065715 2^10 = 1024 so a(10)=1. %H A065715 Harry J. Smith, <a href="/A065715/b065715.txt">Table of n, a(n) for n = 0..1000</a> %t A065715 Table[ Count[ IntegerDigits[2^n], 4], {n, 0, 100} ] %o A065715 (PARI) a(n) = #select(x->(x==4), digits(2^n)); \\ _Michel Marcus_, Jun 15 2018 %o A065715 (Python) %o A065715 def A065715(n): %o A065715 return str(2**n).count('4') # _Chai Wah Wu_, Feb 14 2020 %Y A065715 Cf. 0's A027870, 1's A065712, 2's A065710, 3's A065714, 5's A065716, 6's A065717, 7's A065718, 8's A065719, 9's A065744. %K A065715 nonn,base %O A065715 0,19 %A A065715 _Benoit Cloitre_, Dec 04 2001 %E A065715 More terms from _Robert G. Wilson v_, Dec 07 2001