In particular, what I want to look at is the sum sum_{k=1}^n (pk(mod q)) where p, q in Z >= 1 can be assumed to be coprime but it would be best if solved in the fullest generality.

MISA6zh 2022-11-17 Answered
Compute summation of modules expression?
In particular, what I want to look at is the sum
k = 1 n ( p k ( mod q ) )
where p , q Z 1 can be assumed to be coprime but it would be best if solved in the fullest generality. In the above expression, n is a variable, p,q are fixed, and a(modb) means taking the representative set { 0 , 1 , 2 , . . . , b 1 }. For example, 7 ( mod 3 ) = 1 is the only value we agree upon and 7 ( mod 3 ) 2.
The problem with this is that the list of representatives are permuted by p and hence the methods presented in the initial link are no longer valid.
It would be nice if we can come up with a closed form, but a really tight upper bound of the expression also works.
You can still ask an expert for help

Want to know more about Discrete math?

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

Solve your problem for the price of one coffee

  • Available 24/7
  • Math expert for every subject
  • Pay only if we can solve it
Ask Question

Answers (1)

Patrick Arnold
Answered 2022-11-18 Author has 21 answers
Step 1
Let the sequence 1p,2p,3p,...qp,...,np. This shows that there are some multiples of qp, or 1qp,2qp,...,rqp. Thus we can assume r be the largest number such that r q < n. We can calculate that the number of cycles are n q . The remaining numbers are rqmodn.
We assume that for some integer m 1 , m 2 , such that m 1 p k ( mod q ) and m 2 p k ( mod q ). By adding up the two equations we have ( m 1 m 2 ) p 0 ( mod q ). We know, for every prime p,q, they are coprime. This means that only for | m 1 m 2 | | q. This tells us that in the sets of number 0p,1p,2p,3p,...qp, the modulo of the numbers are always different.
As we take the modulo when 0 r q, thus for every set of numbers 1p,2p,...,qp, their modulo is 0 , 1 , 2 , . . . , q 1, the total sum of them is
n q i = 1 q 1 i = 1 2 n q q ( q 1 )
Step 2
Case 1: p < q, thus we can roughly calculate the modulo by hand.
Case 2: p > q, we can assume p = q + a for some integer a, we can also know that most of the value of a is even as mostly of the prime numbers are odd. Then, for some integer α, α p = α ( q + a ) = α q + α a α a ( mod q ). Thus the entire summation can be evaluated as follow:
k = 1 n p k mod q 1 2 n q q ( q 1 ) + i = 1 n r q i a mod q = 1 2 r ( q 2 q ) + i = 1 n r q i a mod q
Feel free to leave a comment if there're mistakes.
Did you like this example?
Subscribe for all access

Expert Community at Your Service

  • Live experts 24/7
  • Questions are typically answered in as fast as 30 minutes
  • Personalized clear answers
Learn more

You might be interested in

asked 2021-08-18

Discrete Mathematics Basics

1) Find out if the relation R is transitive, symmetric, antisymmetric, or reflexive on the set of all web pages.where (a,b)R if and only if 
I)Web page a has been accessed by everyone who has also accessed Web page b.
II) Both Web page a and Web page b lack any shared links.
III) Web pages a and b both have at least one shared link.

asked 2021-08-02

Suppose that A is the set of sophomores at your school and B is the set of students taking discrete mathematics at your school. Express each of these sets in terms of A and B. 
a) the set of sophomores taking discrete mathematics in your school 
b) the set of sophomores at your school who are not taking discrete mathematics 
c) the set of students at your school who either are sophomores or are taking discrete mathematics 
Use these symbols: 

asked 2021-08-15
How many elements are in the set { 0, { { 0 } }?
asked 2020-11-09
Use proof by Contradiction to prove that the sum of an irrational number and a rational number is irrational.
asked 2022-07-04
Fibonacci Addition Identity for Fibonacci Numbers Separated by 3 Terms
The Fibonacci Addition Identity states that: F n = F m F n m + 1 + F m 1 F n m . This was useful in showing that: F i + k = F k 2 F i + 1 + F k 1 F i + 2 . However, I would like to use this result to express the same for F i and F i + 3 , where we can express F i + k in some linear combination of F i and F i + 3 . Is there any way to do this? I haven't been able to make use of the typical Fibonacci substitutions to make any progress.
asked 2022-07-15
Discrete Math Logic Homework
Consider the following statement:
ϵ > 0 ,   δ > 0 : ( | x a | < δ | f ( x ) L | < ϵ ) .
(a) Write the converse of the statement.
(b) Write the contrapositive of the statement.
asked 2021-08-12
Prove or Disprove: For all sets AandB,|AB|=|A|+|B|

New questions

Solve your problem for the price of one coffee

  • Available 24/7
  • Math expert for every subject
  • Pay only if we can solve it
Ask Question