MathGroup Archive 2003

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

Search the Archive

Simplyfing Sum[Mod[f(k),y],{k,k0,n}] type expressions? (Newbie question)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40202] Simplyfing Sum[Mod[f(k),y],{k,k0,n}] type expressions? (Newbie question)
  • From: prodogoss at btinternet.com (prodogoss)
  • Date: Tue, 25 Mar 2003 14:50:20 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I'm dealing with a problem that requires lots of summations of (x mod
y) type expressions. I had hoped that Mathematica (which I've just
started using) could simplify these but it doesn't seem to work.

E.g., why won't (can't?) Mathematica simplify the expression:

Sum[Mod[3n-k-4, 3],{k, 2n-1,d}] ?


By *hand* I can show that if

S = SUM((3n-k-4) mod 3, k = 2n-1 to d) and

G = d - 2n + 2, then S = f(t) where t = (n - 2 - G) mod 3, and 

(f(0), f(1), f(2)) = ({1, 0, 0}, {0, 1, 0}, {0, 0, 1})(G-1, G, G)

ie 3x1 matrix = (3rd order unit matix) x (3x1 matrix)

Hence, given values of d & n, S can be expressed in such a way that
its calculation is possible without having to labourously evaluate S
for each step, k.


I had heard so much about Mathematica and thought it would excel at
handling problems like this involving summations of Mod[] etc.? Is
there another way of doing this? Any help would be great!

Thanks in advance!


  • Prev by Date: Re: proper way to manipulate lists?
  • Next by Date: Re: proper way to manipulate lists?
  • Previous by thread: NKS 2003: Conference & Minicourse
  • Next by thread: Re: Simplyfing Sum[Mod[f(k),y],{k,k0,n}] type expressions? (Newbie question)