login
Number of times the digit 4 appears in the decimal expansion of n^3.
12

%I #16 Mar 21 2020 16:34:08

%S 0,0,0,0,1,0,0,1,0,0,0,0,0,0,2,0,1,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,

%T 1,1,1,0,1,0,1,0,1,0,1,0,0,0,0,1,0,0,1,1,2,0,0,0,0,0,0,0,0,1,2,1,1,0,

%U 2,0,1,0,1,0,2,1,1,1,2,1,0,2,0,0,1,1,0,0,1,1,0,0,0,1,1

%N Number of times the digit 4 appears in the decimal expansion of n^3.

%C The cubes corresponding to the first occurrence of 1, 2, 3, ... are listed in A036531, i.e., A036531(n)^(1/3) = A048369(n) is the index of the first occurrence of n.

%e 0^3 = 0, 1^3 = 1, 2^3 = 8 and 3^3 = 27 all have a(0) = a(1) = a(2) = a(3) = 0 digits '4'.

%e 4^3 = 64 has a(4) = 1 digit '4'.

%e 14^3 = 2744 has a(14) = 2 digits '4'.

%t Table[DigitCount[n^3, 10, 4], {n, 0, 100}] (* _Robert Price_, Mar 21 2020 *)

%o (PARI) A269244(n)=#select(t->t==4,digits(n^3))

%Y Cf. A036531 and A036527 - A036536; A048369 and A048365 - A048374.

%Y Analog for the other digits 0, 1, ..., 9: A269250, A269241, A269242, A269243, A269244, A269245, A269246, A269247, A269248, A269249.

%Y Analog for squares: A086012 (digit 4), and A086008 - A086017 for digits 0 - 9.

%K nonn,base

%O 0,15

%A _M. F. Hasler_, Feb 20 2016