Re: powersum with a function with variable count of parameters
- To: mathgroup at smc.vnet.net
- Subject: [mg25272] Re: [mg25262] powersum with a function with variable count of parameters
- From: BobHanlon at aol.com
- Date: Sun, 17 Sep 2000 17:33:39 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 9/17/2000 4:54:35 AM, Klamser at t-online.de writes:
>how can I write a function f[x_,xi__]=10^x+10^xi, that returns
>f[1,2,3]->10^1+10^2+10 ^3.
>
>When i use the above definition, I only get
>
>10^1+10^2^3
>
>But I want to get
>
>10^1+10^2+10 ^3
>
f[x__] := Plus @@ (10^{x});
f[a]
10^a
f[a, b]
10^a + 10^b
f[a, b, c]
10^a + 10^b + 10^c
Bob Hanlon