MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: sum over i+j+k==n


n = 4;

Sum[f[i, j, n - i - j], {i, 0, n}, {j, 0, n - i}]

f(0,0,4)+f(0,1,3)+f(0,2,2)+f(0,3,1)+f(0,4,0)+f(1,0,3)+f(1,1,2)+
    f(1,2,1)+f(1,3,0)+f(2,0,2)+f(2,1,1)+f(2,2,0)+f(3,0,1)+f(3,1,0)+f(4,0,0)


Bob Hanlon
]
---- Jack Kennedy <jack at realmode.com> wrote: 
> Hi All,
> I often find myself needing to sum over triples
> (or other tuples) like i,j,k where i+j+k=n. Is there
> a convenient way to write this in Mathematica?
> Thanks,
> Jack
> 
> (version 5.1)
> 



  • Prev by Date: Re: sum over i+j+k==n
  • Next by Date: Re: how fill PolarPlot?
  • Previous by thread: Re: sum over i+j+k==n
  • Next by thread: Re: sum over i+j+k==n