Automating Reduction by a Varying Modulus

In summary, someone is trying to find a way to automate a primality test and is asking for help from others. They have some software and basic skills in programming, but are not sure if they should post in a computer science forum or a math forum.
  • #1
middleCmusic
74
0
Hey guys,

I'm doing some experimenting recently with some primality tests, and I need help figuring out how to automate the following:

Given an even number N, divide by 2k ([itex]k \in \mathbb{N}[/itex]).
If N/2k is an integer, reduce mod 2k+1.
(If N/2k is not an integer, simply move on to the next one.)
Do this for all 2k ≤ N/2.
Then print those k (or 2k, doesn't really matter to me) for which the resulting reduction by the modulus 2k+1 is odd.


EX: N = 20. 20/2 [itex]\equiv[/itex] 1 (mod 3). 20/4 [itex]\equiv[/itex] 0 (mod 5). 20/6 non-integer. 20/8 non-integer. 20/10 [itex]\equiv[/itex] 10 (mod 11).
Print: 2k = 2 (or k = 1), since this is the only odd reduction that was obtained.

If it helps, I have Mathematica and Maple, as well as some basic understanding of LaTeX, but my programming skills are pretty crappy. Thanks in advance!

P. S. I wasn't sure if I should post this in the Computer Science forum, but I figured that it's more of a math topic anyway, and there are bound to be some math people who know how to do this.
 
Technology news on Phys.org
  • #2
middleCmusic said:
Hey guys,

I'm doing some experimenting recently with some primality tests, and I need help figuring out how to automate the following:

Given an even number N, divide by 2k ([itex]k \in \mathbb{N}[/itex]).
If N/2k is an integer, reduce mod 2k+1.
(If N/2k is not an integer, simply move on to the next one.)
Do this for all 2k ≤ N/2.
Then print those k (or 2k, doesn't really matter to me) for which the resulting reduction by the modulus 2k+1 is odd.


EX: N = 20. 20/2 [itex]\equiv[/itex] 1 (mod 3). 20/4 [itex]\equiv[/itex] 0 (mod 5). 20/6 non-integer. 20/8 non-integer. 20/10 [itex]\equiv[/itex] 10 (mod 11).
I'm not following your logic here. In any case, 20/10 = 2 ##\equiv## 2 (mod 11). There's another way of checking for primes - the Sieve of Eratosthenes.
middleCmusic said:
Print: 2k = 2 (or k = 1), since this is the only odd reduction that was obtained.

If it helps, I have Mathematica and Maple, as well as some basic understanding of LaTeX, but my programming skills are pretty crappy. Thanks in advance!

P. S. I wasn't sure if I should post this in the Computer Science forum, but I figured that it's more of a math topic anyway, and there are bound to be some math people who know how to do this.
 
  • #3
Oops my bad. That should have been a 2, yeah. The Sieve of Eratosthenes is not what I'm looking for though. I'm not expecting anyone to see my logic in doing this, just wondering if anyone knows how.
 

1. What is "Automating Reduction by a Varying Modulus"?

"Automating Reduction by a Varying Modulus" is a scientific method used to optimize the reduction process of materials by adjusting the modulus of elasticity. It involves using advanced computer algorithms to determine the most efficient reduction process for a given material.

2. What is the purpose of automating reduction by a varying modulus?

The purpose of automating reduction by a varying modulus is to increase the efficiency and accuracy of the reduction process. By adjusting the modulus of elasticity, the amount of force needed to reduce a material can be optimized, resulting in a more precise and efficient reduction.

3. How does automating reduction by a varying modulus work?

Automating reduction by a varying modulus works by using computer software to analyze the properties of a material and determine the most efficient reduction process. The software takes into account factors such as the material's modulus of elasticity, thickness, and desired final dimensions to generate an optimized reduction plan.

4. What are the benefits of automating reduction by a varying modulus?

The benefits of automating reduction by a varying modulus include increased efficiency, improved accuracy, and reduced material waste. It also allows for the customization of reduction processes for different materials, resulting in better overall performance and cost-effectiveness.

5. Is automating reduction by a varying modulus widely used in the scientific community?

Yes, automating reduction by a varying modulus is a commonly used method in the scientific community, especially in material science and engineering fields. It is continually being developed and refined to improve the reduction process and achieve better results.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
17
Views
2K
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
2
Views
790
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
1K
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Programming and Computer Science
Replies
11
Views
1K
Back
Top