OFFSET
1,1
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
EXAMPLE
13 is in the sequence because (1*3)*(1+3) = 3*4 = 12 < 13.
125 is a term because (1*2*5)*(1+2+5) = 10*8 = 80 < 125.
MATHEMATICA
asum[x_] := Apply[Plus, IntegerDigits[x]] apro[x_] := Apply[Times, IntegerDigits[x]] sz[x_] := asu[x]*apro[x] Do[s=sz[n]; If[Greater[n, s], Print[n]], {n, 1, 1000}]
okQ[n_]:=Module[{idn=IntegerDigits[n]}, n> Total[idn]Times@@idn]; Select[Range[150], okQ] (* Harvey P. Dale, Mar 12 2011 *)
PROG
(ARIBAS): function a066312(a, b: integer); var n, k, j, p, d: integer; s: string; begin for n := a to b do s := itoa(n); k := 0; p := 1; for j := 0 to length(s) - 1 do d := atoi(s[j..j]); k := k + d; p := p*d; end; if n > p*k then write(n, ", "); end; end; end; a066312(0, 150).
(PARI) SumD(x)= { local(s=0); while (x>9, s+=x%10; x\=10); return(s + x) } ProdD(x)= { local(p=1); while (x>9 && p>0, p*=x%10; x\=10); return(p*x) } { n=0; for (m=1, 10^9, if (m > ProdD(m)*SumD(m), write("b066309.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Feb 10 2010
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Labos Elemer and Klaus Brockhaus, Dec 13 2001
STATUS
approved