login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest cubes whose digits occur with the same frequency n.
5

%I #28 Apr 30 2022 11:40:54

%S 0,1331,700227072,22676697737363992239,1728999927211172788179288,

%T 256263633328535368685258882625,19194114355415391344355399945943513

%N Smallest cubes whose digits occur with the same frequency n.

%H Patrick De Geest, <a href="http://www.worldofnumbers.com/samedigits.htm">Numbers whose digits occur with same frequency</a>

%e 22676697737363992239 (= 2830479^3) and its digits 2, 3, 6, 7 and 9 each occur four times.

%t Table[i = 0;

%t While[x = i^3; Union@DeleteCases[DigitCount[x], 0] != {n}, i++];

%t x, {n, 7}] (* _Robert Price_, Oct 12 2019 *)

%t Select[Range[400]^3,Length[Union[DeleteCases[DigitCount[#],0]]]==1&] (* _Harvey P. Dale_, Apr 30 2022 *)

%o (Python)

%o def A052072(n):

%o a, b, c = 0, 0, 0

%o for i in range(10**9):

%o s = str(c)

%o for d in set(s):

%o if s.count(d) != n:

%o break

%o else:

%o return c

%o c += a + b + 1

%o b += 2*a + 3

%o a += 3

%o return 'search limit reached.' # _Chai Wah Wu_, Aug 11 2015

%Y Cf. A052071, A052047, A052048, A052051, A052052, A052070.

%K nonn,base,more,nice

%O 1,2

%A _Patrick De Geest_, Jan 15 2000

%E Offset corrected by _Michel Marcus_, Aug 12 2015

%E a(7) from _Giovanni Resta_, Aug 19 2018