Primality test from pascal triangle

In summary, the conversation discusses an approach for checking the primality of a number by dividing its binomial coefficients into equal parts and testing for divisibility. However, this method is inefficient and modern tests for prime numbers are much faster.
  • #1
rajeshmarndi
319
0
In pascal triangle, if all the elements of a row(except 1 in both end) are divisible by the row number, then the row number is a prime.

Or if the coefficient of binomial expansion (except 1's) are divisible by the power, then the power is a prime.
It is inefficient to check all the coefficient upto the middle term(since the coefficient repeat, thereafter) with the power of the binomial expansion, for divisibility.

But if we take this way,

Say 15361, i.e

(1+1)15361 = 1 + C(15361,1) + C(15361,2) + ... + C(15361,7680) + C(15361,7681) + ... + C(15361,15360) + 1
So, if 15361 is a prime, then it will also be divisible, to the sum of coefficient, too. But it is highly possible, composite number will also divide the sum of coefficient.
But if we take summation of coefficient in parts, then it becomes almost zero, that each summation part,which will have different values, will also be divisible by power of composite numbers.

That is, in the above example.

If we divide ,7680 coefficient(upto middle term), of the above examples, into say 12 equal parts, i.e each part will have 640 coefficent and each summation part will be of different values. Then, the possibility become highly, that only a power of prime will only divide all the 12 parts summation.C(15361,1)+...+C(15361,640) = will be divisible by the prime power
C(15361,641)+...+C(15361,1280) = will be divisible by the prime power
C(15361,1281)+...+C(15361,1920) = will be divisible by the prime power
C(15361,1921)+...+C(15361,2560) = will be divisible by the prime power
C(15361,2561)+...+C(15361,3200) = will be divisible by the prime power
C(15361,3201)+...+C(15361,3840) = will be divisible by the prime power
C(15361,3841)+...+C(15361,4480) = will be divisible by the prime power
C(15361,4481)+...+C(15361,5120) = will be divisible by the prime power
C(15361,5121)+...+C(15361,5760) = will be divisible by the prime power
C(15361,5761)+...+C(15361,6400) = will be divisible by the prime power
C(15361,6401)+...+C(15361,7040) = will be divisible by the prime power
C(15361,7041)+...+C(15361,7680) = will be divisible by the prime power
So, what is the efficieny of such check, for primality.

Thanks.
 
Mathematics news on Phys.org
  • #2
rajeshmarndi said:
So, what is the efficieny of such check, for primality.
Extremely bad. To check the primality of n, you have to calculate n/2 binomial coefficients. That works for n=10000, it might work for n=1010, but it won't work for 1040, where n/2 exceeds the total number of computing steps every computer in the world combined ever did.

An approach that is still extremely slow, but orders of magnitude better: just test for divisibility from 2 to ##\sqrt n##. Instead of n/2, the number of calculations scales with ##\sqrt n##.

Modern tests for prime numbers can check 100-digit numbers in a second.
 
  • #3
mfb said:
Extremely bad. To check the primality of n, you have to calculate n/2 binomial coefficients.
I do not know if there is a formula for summation of coefficent of
C(15361,1)+...+C(15361,640) =

If there is, then you are NOT calculating n/2 binomial coefficent.

You will be only calculating how many parts you are dividing n/2. And then checking those, divisibility with n.
 
  • #4
There is no useful formula that would speed up calculations notably. It doesn't help to be better by a factor of 10, 1000 or even 1010 if you need a speedup of more than 101000 to be competitive.
 

Related to Primality test from pascal triangle

1. What is a primality test from Pascal's triangle?

A primality test from Pascal's triangle is a method used to determine if a given number is prime or composite (not prime). It makes use of the patterns and properties found in Pascal's triangle to efficiently check for primality.

2. How does a primality test from Pascal's triangle work?

The test works by generating a row of Pascal's triangle using the given number as the row index. If all the numbers in the row are either 1 or a prime number, then the given number is also prime. If any number in the row is composite, then the given number is also composite.

3. Why is a primality test from Pascal's triangle efficient?

This test is efficient because it only requires generating one row of Pascal's triangle, which can be done in linear time. It also checks for primality in a binary manner, meaning it can quickly determine if a number is composite without having to go through all the steps of traditional primality tests.

4. Are there any limitations to using a primality test from Pascal's triangle?

Yes, this test can only be used for numbers that are less than or equal to the maximum row index of Pascal's triangle that can be represented by the computer's memory. This means that for extremely large numbers, a different primality test may be more suitable.

5. What are some other applications of Pascal's triangle?

Besides being used in primality testing, Pascal's triangle has many other applications in mathematics and computer science. It can be used to find binomial coefficients, calculate probabilities, and even generate fractal patterns. It also has connections to number theory, combinatorics, and the Fibonacci sequence.

Similar threads

  • General Math
Replies
16
Views
3K
Replies
66
Views
4K
  • Math Proof Training and Practice
2
Replies
61
Views
6K
Replies
1
Views
2K
  • General Math
4
Replies
125
Views
17K
  • Precalculus Mathematics Homework Help
Replies
4
Views
2K
  • Math Proof Training and Practice
2
Replies
67
Views
8K
Replies
6
Views
1K
  • Special and General Relativity
3
Replies
75
Views
3K
Back
Top