Re: Is it possible to impose a condition on an iterator of
- To: mathgroup at smc.vnet.net
- Subject: [mg101548] Re: [mg101499] Is it possible to impose a condition on an iterator of
- From: Adriano Pascoletti <adriano.pascoletti at dimi.uniud.it>
- Date: Fri, 10 Jul 2009 06:42:10 -0400 (EDT)
- References: <200907090552.BAA16854@smc.vnet.net>
In[6]:= r1 = Sum[a^2 - 3*(a/(4*a^2)), {a, {1, 2, 3, 4, 5, 13, 14, 15, 16, 17, 18, 19, 20}}]; In[7]:= r2 = Sum[a^2 - 3*(a/(4*a^2)), {a, DeleteCases[Range[20], i_ /; i >= 6 && i <= 12]}]; In[8]:= r3 = Sum[If[a >= 6 && a <= 12, 0, a^2 - 3*(a/(4*a^2))], {a, 1, 20}]; In[9]:= r1 === r2 === r3 Out[9]= True In[10]:= r1 Out[10]= 64135524211/28217280 Adriano Pascoletti 2009/7/9 Mauro <mauro at nonoyahoo.com> > I would like to perform a summation of this type, > > Sum[a^2 - 3 a/(4 a^2), {a, 1, 20}] > > excluding however some values of the iteratore, I would for instance > like to exclude the values than to greater of 6 and inferior to 12. Is > it possible? > > Thanks > >
- References:
- Is it possible to impose a condition on an iterator of the summation ?
- From: Mauro <mauro@NONOyahoo.com>
- Is it possible to impose a condition on an iterator of the summation ?