CTK Exchange
Front Page
Movie shortcuts
Personal info
Awards
Reciprocal links
Terms of use
Privacy Policy

Interactive Activities

Cut The Knot!
MSET99 Talk
Games & Puzzles
Arithmetic/Algebra
Geometry
Probability
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
My Logo
Math Poll
Other Math sit's
Guest book
News sit's

Recommend this site

Manifesto: what CTK is about Search CTK Buying a book is a commitment to learning Table of content Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

CTK Exchange

Subject: "Mersenne Primes and Square Triangular Numbers"     Previous Topic | Next Topic
Printer-friendly copy     Email this topic to a friend    
Conferences The CTK Exchange This and that Topic #709
Reading Topic #709
Ramsey2879
guest
May-17-06, 12:35 PM (EST)
 
"Mersenne Primes and Square Triangular Numbers"
 
   Let M(p) = 2^(p)-1. These are known as Mersenne Numbers. I checked the
following conjecture for values of p between 2 and 27. If and only if M
(p) is prime then the 2^(p-1)th square triangular number is divisible
by M(p). Example the fourth ( (2^{3-1})th) square triangular number,
1225
is divisible by M(3). I am confident that there should be a proof of
this in the nearby future. Actually there is even a stronger identity concerning the recursive series a(n) = 6*a(n-1) - a(n-2). E.g if M(p) is prime then a(1+i) = a(2^(p-1)+ i) mod M(p)

For more information see
https://groups.yahoo.com/group/Triangular_Numbers/message/23 and other
messages of this group


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
Ramsey2879
guest
May-19-06, 06:58 AM (EST)
 
1. "RE: Mersenne Primes and Square Triangular Numbers"
In response to message #0
 
   After more consideration, I realized that it is not necessary to store more than one large term and that my test can be refined so that there are only p-1 terms that need to be calculated.

Input p
M(p) = 2^p -1
S_0 = 1
C = p
Do
S_0 = 4*S_0)*(8*S_0 + 1) Mod M(p)
C = C - 1
Loop until C = 1
If S_0 = 1 Then
Print "M(" & p & ") is prime"
Else
Print "M(" & p & ") is not prime"
End If.

Although this test involves more steps, it basically involves almost the same complexity as the Lucus-Lehmer Test since the additional steps are register shifts and the addition of 1. Thus, it would be easy to express each sequential S_0 term in base 2 in advance or even to rewrite the sequence as a sequence of (p-1)/2 terms.
It is based upon the fact that 1 is the square triangular number and ST(1) that The S_0's follow the sequence ST(1),ST(2),ST(4),ST(8),ST(16)...ST(2^(p-1) in the sequence of square triangular numbers (modulus M(p) of course). I checked the test for p = 3 to 28. It doesn't work for p = 2 since 3 is a factor of 6. It is remarkable that it appears that if and only if p is a Mersenne prime, i.e. 2^p-1 is prime, then ST(2^(p-1)) == 1 mod M(p).

Any comments


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
ramsey2879
guest
May-29-06, 06:05 AM (EST)
 
2. "RE: Mersenne Primes and Square Triangular Numbers"
In response to message #1
 
   >After more consideration, I realized that it is not
>necessary to store more than one large term and that my test
>can be refined so that there are only p-1 terms that need to
>be calculated.
>
>Input p
>M(p) = 2^p -1
>S_0 = 1
>C = p
>Do
>S_0 = 4*S_0)*(8*S_0 + 1) Mod M(p)
>C = C - 1
>Loop until C = 1
>If S_0 = 1 Then
>Print "M(" & p & ") is prime"
>Else
>Print "M(" & p & ") is not prime"
>End If.
I wrote a VBA basic program using an Excel macro that set up a 3*10,000 boolean array, and wrote my own addition subtraction and multiplication macros for these 3 regristers. The program was designed to check my conjecture up to p = 4999. I let it run until it gave results up through the 160th odd prime (p = 929) and it correctly indicated prime or not prime for each of these Mersenne numbers for all odd primes in this range. I consider p = 2 to be a special exception since 3 divides 6 which figures in the recursive formula for square triangular numbers: ST =(S_n)^2 where S_n = 6*S_(n-1)-S_(n-2).
1.
Is it correct to say that there is less than a (1/2)^(160) probability that my conjecture is false and that a counter example exists for an odd prime? Assuming that no one finds a counter example of course
2.
If this probability is expressed as a decimal number, how many zeros come between the first non zero digit and the decimal point?


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
erszega
Member since Apr-23-05
Jun-02-06, 12:39 PM (EST)
Click to EMail erszega Click to send private message to erszega Click to view user profileClick to add this user to your buddy list  
3. "RE: Mersenne Primes and Square Triangular Numbers"
In response to message #1
 
   >if and only if p is a Mersenne prime, i.e. 2^p-1 is prime, then ST(2^(p-1)) == 1 mod M(p)

As pointed out at
https://www.cut-the-knot.org/do_you_know/triSquare.shtml, square triangular numbers can be obtained by squaring the members of the sequence generated by the recurrence relation

(i) u(n) = 6*u(n-1) - u(n-2), n > 1, u(0)=0, u(1)=1


Therefore the statement can be rephrased by saying that

(ii) iff 2^p-1 is a Mersenne prime then u(2^(p-1)) = 1 (mod 2^p-1).

What is important, I think, is that u(n) is a Fibonacci type sequence, and Fibonacci type sequences reduced modulo an integer are cyclic.

For example, if p=3, then 2^p-1=7, a Mersenne prime, and u(n) modulo 7 will be:

u(0)=0 (mod 7)
u(1)=1 (mod 7)
u(2)=6 (mod 7)
u(3)=0 (mod 7)
u(4)=1 (mod 7)
u(5)=6 (mod 7), etc.

The cycle length is 3, and u(2^(p-1))=u(4) = u(1) (mod 7).
In general, if the cycle length of u(n) reduced modulo q a prime is c, then

u(1+c)=u(1) mod q, that is u(1+c)=1 (mod q).

Therefore, if I am right, what we need to prove is that

(iii) the cycle length divides 2^(p-1)-1 .

Why? With c denoting the cycle length, if c divides 2^(p-1)-1, then, for an integer k, ck+1=2^(p-1), that is, as stated in (ii), u(2^(p-1)) = u(ck+1) = 1 (mod 2^p-1).

There is an article at https://www.damtp.cam.ac.uk/user/dv211/mathgaz06.pdf, written by Dominic Vella and Alfred Vella, discussing the cycle lengths of generalised Fibonacci sequences of the type

G(n) = a*G(n-1) + b*G(n-2).

It defines Delta as a^2+4b, and then states in Theorem 6 (I only changed the letter denoting the prime):

"If Delta is a quadratic residue modulo q then C(q) | (q-1)", where C(q) is the cycle length (modulo q).

For u(n), a=6, b=-1, therefore Delta=32.
32 is a quadratic residue modulo a Mersenne prime, because there is an integer x for which
x^2 = 32 (mod 2^p-1) where 2^p-1 is a Mersenne prime. This can be rephrased as saying that there is an integer k for which k*(2^p-1)+32 is square. Take k=32=2^5, then 32*(2^p-1)+32 = 2^(p+5). As 2^p-1 is a Mersenne prime, p is odd for p>2, and so 2^(p+5) is a square for p>2.

Therefore the cycle length of u(n) modulo a Mersenne prime 2^p-1 divides 2^p-2 = 2*(2^(p-1)-1). That proves (iii). That, I think, also proves the if part of the conjecture. I am not sure of the "only if" part.

I would be grateful for a confirmation whether this really proves the if part of the conjecture.

Andras Erszegi


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
erszega
Member since Apr-23-05
Jun-02-06, 01:17 PM (EST)
Click to EMail erszega Click to send private message to erszega Click to view user profileClick to add this user to your buddy list  
4. "RE: Mersenne Primes and Square Triangular Numbers"
In response to message #3
 
   Sorry, the correct internet addresses are:

square triangular numbers:

https://www.cut-the-knot.org/do_you_know/triSquare.shtml


the Vella article on cycle lengths of Fibonacci sequences reduced modulo a prime:

https://www.damtp.cam.ac.uk/user/dv211/mathgaz06.pdf


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
erszega
Member since Apr-23-05
Jun-03-06, 06:40 AM (EST)
Click to EMail erszega Click to send private message to erszega Click to view user profileClick to add this user to your buddy list  
5. "RE: Mersenne Primes and Square Triangular Numbers"
In response to message #4
 
   I spotted a mistake, which is unfortunately elementary, in my reasoning.

I concluded that the cycle length c divides 2*(2^(p-1)-1). Then I made the error of further concluding that c divides 2^(p-1)-1. However, this is obviously false when c = 2*(2^(p-1)-1).

For instance, if we consider the following sequence:

(iv) G(n)=4*G(n-1)+4*G(n-2), n>1, G(0)=0, G(1)=1,

then theorem 6 cited from https://www.damtp.cam.ac.uk/user/dv211/mathgaz06.pdf correctly predicts that the cycle length of G(n) in (iv) modulo 31 divides 30, because Delta = 4^4+4*4 = 32 is a quadratic residue modulo 31. However, the cycle length is 30, and so it divides 2*(2^(p-1)-1), but not 2^(p-1)-1.

Therefore I did not prove the conjecture. On the other hand, I think that the approach points in the right direction.

Regards


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top

Conferences | Forums | Topics | Previous Topic | Next Topic

You may be curious to have a look at the old CTK Exchange archive.
Please do not post there.

Copyright © 1996-2018 Alexander Bogomolny

Search:
Keywords:

Google
Web CTK