OFFSET
1,2
COMMENTS
a(n) can be greater than, less than, or equal to n; see Example section.
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
EXAMPLE
For n = 12, a(12) = (1 + 2)*(1*2) = 3*2 = 6 < n;
for n = 19, a(19) = (1 + 9)*(1*9) = 90 > n;
for n = 135, a(135) =(1 + 3 + 5)*(1*3*5) = 135 = n.
MATHEMATICA
asum[x_] := Apply[Plus, IntegerDigits[x]] apro[x_] := Apply[Times, IntegerDigits[x]] a[n]=asum[n]*apro[n]
sdpd[n_]:=Module[{idn=IntegerDigits[n]}, Total[idn]Times@@idn]; Array[ sdpd, 70] (* Harvey P. Dale, Dec 31 2011 *)
PROG
(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) }
{ for (n=1, 1000, a=SumD(n)*ProdD(n); write("b066308.txt", n, " ", a) ) } \\ Harry J. Smith, Feb 09 2010
(PARI) a(n) = my(d = digits(n)); vecsum(d) * prod(k=1, #d, d[k]); \\ Michel Marcus, Feb 24 2017
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Labos Elemer, Dec 13 2001
EXTENSIONS
Edited by Jon E. Schoenfield, Jul 09 2018
STATUS
approved