login

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

Numbers n such that n*product_of_digits(n) is a nonzero cube.
0

%I #14 Mar 28 2015 00:03:55

%S 1,8,243,784,7776,9826,13122,24389,26244,39366,47628,55566,59895,

%T 71442,82944,122825,124416,226981,263424,275625,316368,323433,333396,

%U 588245,663255,774144,843648,1339893,1492992,1613472,2341344,3816336,3981312,8719893,8992364,9393931,9927988,11212884,11239424,14823774

%N Numbers n such that n*product_of_digits(n) is a nonzero cube.

%e 7776*(7*7*7*6) = 1600030008 = 252^3. Thus, 7776 is a member of this sequence.

%o (Python)

%o def DP(n):

%o ..p = 1

%o ..for i in str(n):

%o ....p *= int(i)

%o ..return p

%o def a(n):

%o ..k = 0

%o ..while k < n:

%o ....if k**3 == n*DP(n):

%o ......return n

%o ....if k**3 > n*DP(n):

%o ......return 0

%o ....k += 1

%o n = 1

%o while n < 10**6:

%o ..if a(n):

%o ....print(n, end=', ')

%o ..n += 1

%o # Simplified by Derek Orr, Mar 22 2015

%o (PARI) for(n=1,10^7,d=digits(n);p=prod(i=1,#d,d[i]);if(p&&ispower(n*p,3),print1(n,", "))) \\ _Derek Orr_, Mar 22 2015

%Y Cf. A066565, A098736.

%K nonn,base

%O 1,2

%A _Derek Orr_, Sep 25 2013

%E Corrected and extended by _Derek Orr_, Mar 22 2015