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 A269242 #25 Sep 08 2022 08:46:15 %S A269242 0,0,0,1,0,1,1,0,1,1,0,0,1,1,1,0,0,0,1,0,0,1,0,1,1,1,0,0,2,1,1,1,1,0, %T A269242 0,1,0,0,1,0,0,1,0,0,0,1,0,1,1,0,1,1,0,0,0,0,0,0,1,1,1,2,2,1,2,2,1,0, %U A269242 1,1,0,0,1,0,2,1,0,0,1,0,1,0,0,0,1,1,0,0,1,0,1,0,0,0,0,0,0,1 %N A269242 Number of times the digit 2 appears in the decimal expansion of n^3. %C A269242 The cubes corresponding to the first occurrence of 1, 2, 3, ... are listed in A036529, i.e., A036529(n)^(1/3) = A048367(n) is the index of the first occurrence of n. %H A269242 Robert Israel, <a href="/A269242/b269242.txt">Table of n, a(n) for n = 0..10000</a> %e A269242 0^3 = 0 has a(0) = 0 digits '2'. %e A269242 1^3 = 1 has a(1) = 0 digits '2'. %e A269242 2^3 = 8 has a(2) = 0 digits '2'. %e A269242 3^3 = 27 has a(3) = 1 digits '2'. %e A269242 4^3 = 64 has a(4) = 0 digits '2'. %e A269242 5^3 = 125 has a(5) = 1 digit '2'. %e A269242 28^3 = 21952 is the least cube which has a(28) = 2 digits '2'. %p A269242 seq(numboccur(2,convert(n^3,base,10)),n=0..100); # _Robert Israel_, Jan 26 2020 %t A269242 Table[DigitCount[n^3, 10, 2], {n, 0, 100}] (* _Robert Price_, Mar 21 2020 *) %o A269242 (PARI) A269242(n)=#select(t->t==2,digits(n^3)) %o A269242 (Magma) [Multiplicity(Intseq(n^3),2): n in [0..100]]; // _Marius A. Burtea_, Jan 26 2020 %Y A269242 Cf. A036529 and A036527 - A036536; A048367 and A048365 - A048374. %Y A269242 Analog for the other digits 0, 1, ..., 9: A269250, A269241, A269242, A269243, A269244, A269245, A269246, A269247, A269248, A269249. %Y A269242 Analog for squares: A086010 (digit 2), and A086008 - A086017 for digits 0 - 9. %K A269242 nonn,base %O A269242 0,29 %A A269242 _M. F. Hasler_, Feb 20 2016