login
Numbers n such that the largest digit of n^3 is 8.
3

%I #11 Jul 03 2020 23:52:34

%S 2,12,18,20,22,24,32,35,38,42,44,47,52,53,62,72,75,82,83,87,88,92,93,

%T 94,95,96,102,104,114,115,120,122,123,127,138,141,142,145,152,153,155,

%U 161,162,172,174,180,182,183,186,192,194,195,200,201,202,203,205,206,217,220,228,232,238,240,242,244,251

%N Numbers n such that the largest digit of n^3 is 8.

%C For any term a(n), all numbers of the form a(n)*10^k, k >= 0, are in this sequence. We could call "primitive" the terms not of this form, i.e., without trailing '0'.

%H Robert Israel, <a href="/A294998/b294998.txt">Table of n, a(n) for n = 1..10000</a>

%e 12 is in the sequence because the largest digit of 12^3 = 1728 is 8.

%p filter:= n -> max(convert(n^3,base,10))=8:

%p select(filter, [$1..1000]); # _Robert Israel_, Jul 03 2020

%t Select[Range[300],Max[IntegerDigits[#^3]]==8&] (* _Harvey P. Dale_, Aug 21 2019 *)

%o (PARI) for(n=1,500, vecmax(digits(n^3))==8&&print1(n","))

%Y Cf. A295023 (the corresponding cubes); A278937, A294664, A294665, A294996 .. A294999 (same for digit 3, ..., 9); A295008 (same for squares).

%Y Cf. A000578 (the cubes).

%K nonn,base

%O 1,1

%A _M. F. Hasler_, Nov 13 2017