Re: Multiple sum with iterators that cannot equal
- To: mathgroup at smc.vnet.net
- Subject: [mg19621] Re: Multiple sum with iterators that cannot equal
- From: Mark Fisher <mefisher at bellsouth.net>
- Date: Sun, 5 Sep 1999 16:57:42 -0400
- References: <7pl714$cgd@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
If you have version 4, you can use (1-KroneckerDelta[i, j]) to kill off
the terms you don't want.
--Mark
Eric Spahr wrote:
>
> Using multiple summmation signs with condition 'i "not
> equal" j', evaluation stops immediately as 'i' starts as
> 1 as does 'j'. My formula requires that the 'i's' and
> 'j's' together:
>
> Sum[Sum[f,{j,1,n}],{i,1,n}] ignore cases where i = j.
>
> Or as copied from my notebook:
>
> \!\(\(\(\[Sum]\+\(i = 1\)\%n\[Sum]\+\(j = 1\)\%n\)\+\(i
> != j\)\) \(w\_i\)
> w\_j\)
>
> How do I solve this without some cumbersome loops.
>
> Many Thanks
>
> Eric Spahr
> Cottage Technology rspahr at worldnet.att.net