OFFSET
0,3
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20000
Eric Weisstein's World of Mathematics, Symmetric polynomial.
Wikipedia, Elementary symmetric polynomial.
EXAMPLE
a(34) = 3 + 4 + 3*4 = 19, a(124) = (1+2+4)+(1*2+2*4+1*4)+(1*2*4) = 29.
MAPLE
with(combinat):
a:= n-> (l-> add(mul(l[i], i=w), w=choose(
nops(l)))-1)(convert(n, base, 10)):
seq(a(n), n=0..101); # Alois P. Heinz, Nov 20 2015
PROG
(PARI) sympol(X, n)=my(s=0); forvec(i=vector(n, j, [1, #X]), s+=prod(k=1, n, X[i[k]]), 2); s ;
a(n) = my(d=digits(n)); sum(k=1, #d, sympol(d, k)); \\ Michel Marcus, Apr 06 2021
CROSSREFS
KEYWORD
AUTHOR
Amarnath Murthy, May 06 2001
EXTENSIONS
More terms from Erich Friedman, Jun 03 2001
a(0)=0 prepended by Alois P. Heinz, Nov 20 2015
STATUS
approved