login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A229184 Numbers decremented by their digit product produce a cube. 1

%I #35 Mar 24 2015 08:22:07

%S 0,1,2,3,4,5,6,7,8,9,71,145,167,264,361,757,1000,1439,1791,2233,3525,

%T 3627,3959,4096,4864,4995,6677,8000,8128,8672,9575,10648,14848,23488,

%U 24976,25199,25829,26549,27000,27224,35648,39304,43235,50653,53893,64000,74088,79507,91215,93285,94365

%N Numbers decremented by their digit product produce a cube.

%C 4 is the only zeroless number < 10^7 that is a member of this sequence and A229185 (Numbers incremented by their digit product produce a cube).

%e 167 - 1*6*7 = 125 = 5^3.

%t Select[Range[0,100000], IntegerQ[(# - Times @@ IntegerDigits[#])^(1/3)] &] (* _T. D. Noe_, Sep 16 2013 *)

%o (Python)

%o def DP(n):

%o ..p = 1

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

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

%o ..return p

%o for n in range(10**4):

%o ..k = 0

%o ..P = n - DP(n)

%o ..while P >= k**3:

%o ....if P == k**3:

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

%o ......break

%o ....k += 1

%o # Simplified by _Derek Orr_, Mar 12 2015

%o (PARI) for(n=0,10^5,d=digits(n);P=n-prod(i=1,#d,d[i]);if(ispower(P,3),print1(n,", "))) \\ _Derek Orr_, Mar 12 2015

%Y Cf. A007954, A228187.

%K nonn,easy,base

%O 1,3

%A _Derek Orr_, Sep 15 2013

%E More terms and prepended a(1) = 0 from _Derek Orr_, Mar 12 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)