login
A227225
Numbers n such that (sum of digits of n) + (product of digits of n) is a perfect cube.
0
0, 4, 10, 22, 36, 63, 80, 100, 107, 113, 128, 131, 170, 177, 182, 206, 218, 260, 269, 281, 296, 305, 311, 350, 404, 440, 503, 530, 602, 620, 629, 692, 701, 710, 717, 771, 800, 812, 821, 926, 962, 1000, 1007, 1016, 1025, 1034, 1043, 1052, 1061, 1070, 1106, 1160, 1168, 1186, 1205, 1233, 1250, 1304, 1323, 1332, 1340, 1349, 1394, 1403, 1430
OFFSET
1,2
EXAMPLE
For 311, (3+1+1) + (3*1*1) = 5 + 3 = 8 = 2^3. Hence, 311 is a member of the sequence.
MATHEMATICA
sdpdQ[n_]:=Module[{idn=IntegerDigits[n]}, IntegerQ[Surd[Total[ idn]+ Times@@idn, 3]]]; Select[Range[0, 1500], sdpdQ] (* Harvey P. Dale, Apr 05 2016 *)
PROG
(Python)
def DS(n):
..s = 0
..for i in str(n):
....s += int(i)
..return s
def DP(n):
..p = 1
..for i in str(n):
....p *= int(i)
..return p
for n in range(2000):
..k = 0
..while k**3 <= DS(n)+DP(n):
....if k**3 == DS(n)+DP(n):
......print(n, end=', ')
......break
....else:
......k += 1
## Edited by Derek Orr, Apr 10 2015
(PARI) for(n=0, 2000, d=digits(n); p=prod(i=1, #d, d[i]); s=sumdigits(n); if(ispower(s+p, 3), print1(n, ", "))) \\ Derek Orr, Apr 10 2015
CROSSREFS
Sequence in context: A112774 A352296 A369385 * A008178 A009891 A301077
KEYWORD
nonn,base,easy
AUTHOR
Derek Orr, Sep 19 2013
EXTENSIONS
More terms from Derek Orr, Apr 10 2015
STATUS
approved