
Number Theory Number Theory Math Forum 
 LinkBack  Thread Tools  Display Modes 
May 22nd, 2016, 06:37 AM  #1 
Newbie Joined: May 2016 From: Maine Posts: 6 Thanks: 0  A partial property of primes conjecture?
I believe that some information about a natural number's primality can be found from the continued fraction representation of its square root. *The origin of this hypothesis stems from studying the Ulam and Sacks number spirals, most evidently from the later. The Sacks spiral essentially plots a spiral by using theta = sqrt(n)*2pi and r = sqrt(n), although I've found that using r = n produces better looking results. If you plot out just the prime numbers using this method, Fibonacci style spirals appear throughout the system. This leads to continued fraction representations of the square roots of natural numbers. Continued fractions can also be treated as recurrence relations, like the Fibonacci series, which is how I got to this point. The root of any nonsquare natural number has been proven to be irrational, while the root's continued fraction representations have also been proven to be periodic and palindromic. By including*the natural integer portion of the root along with the set of coefficients of a single period of the continued fraction of the root, we can get a sort of fingerprint of the number. This fingerprint is unique and deterministic. Anyways, my conjecture is that for the continued fraction representation of the square root of a natural number N, if the number of terms in its period, add one to include the integer root, is odd, then the middle term must be the root of the nearest odd square which is not greater than N in order for N to be prime. I've run this test programatically well into the billions and trillions, and although false positives exist, I have yet to find a false negative case. For example,19 is prime and the middle term 3 is equals to the root of the nearest odd square not greater than 19. √19 [ 4; 2, 1, 3, 1, 2, 8] However,27 is an early false positive. Even though the middle term 5*is the root of the nearlest odd square, this number is not prime. √27 [ 5; 5, 10] Any thoughts? Last edited by Jason LaFrance; May 22nd, 2016 at 06:45 AM. 
May 23rd, 2016, 06:02 PM  #2 
Senior Member Joined: Jul 2012 From: DFW Area Posts: 642 Thanks: 99 Math Focus: Electrical Engineering Applications 
Hi Jason, And welcome to the forum. I find this fascinating, but unfortunately I am not a mathematician nor (especially!) a number theory expert so I have no knowledge of any previous work on this subject. However, I have some experience with continued fraction expansion calculations, so I might be able to write some programs to check your work, if you would like me to (up to a point of course, I'm not sure about checking up to trillions. And don't worry, I won't take any credit for your work). If I were to write these programs, I would probably use GMP on Linux or MPIR on Windows. Did you use similar software? What was your check for primality? Also, does your analysis show that if the number of terms is even, the last term is equal to twice the first term as the following samples (and others) show? 10th prime: 29 100th prime: 541 1000th prime: 7919 10000th prime: 104729 Notes: You may have to repeatedly hit "more terms" as I can't seem to get the view with all terms to show automatically. Also, I have no idea how common or uncommon this property (last entry is double the first entry) is for nonprime number square roots. I will let you research that if you are so inclined (another reason that I will take no credit). Last edited by jks; May 23rd, 2016 at 06:11 PM. Reason: Added links for GMP and MPIR. 
May 23rd, 2016, 07:23 PM  #3 
Senior Member Joined: Jul 2012 From: DFW Area Posts: 642 Thanks: 99 Math Focus: Electrical Engineering Applications 
Um, yeah, about that part in bold in my post above, that seems to be the case with just about every CFE of a root of a nonsquare integer. But not being an expert I still find it fascinating.

May 25th, 2016, 07:06 PM  #4 
Newbie Joined: May 2016 From: Maine Posts: 6 Thanks: 0 
I wrote my test code in Java, since I'm very familiar with that language. Just to be sure, I'm using pretty standard brute force divisibility checking up to the root of the testing number. I've let it run into the hundreds of billions with out a contradictory case!

May 25th, 2016, 09:14 PM  #5 
Senior Member Joined: Jul 2012 From: DFW Area Posts: 642 Thanks: 99 Math Focus: Electrical Engineering Applications 
I think I will play around with this, trying a few different things. Have you researched to see if there is any literature out there that specifically states the conjecture (other that what you have presented here)? Edit: Also, the primes that you find that have the middle term you are looking for, are they of the form $4n+3$ as in OEIS A002145. A very quick check of the patterns of square roots from 199 as given in the link you provided seems to indicate it. Last edited by jks; May 25th, 2016 at 10:06 PM. Reason: Added the OEIS question. 
May 26th, 2016, 11:28 AM  #6 
Newbie Joined: May 2016 From: Maine Posts: 6 Thanks: 0 
I haven't found any reference to this anywhere else, so far. As for the 4n+3 series, I noticed this about a month ago, but I was checking as (n % 4) = 3. The 4n+3 primes do seem to pass this conjecture, but there are other odd CFE termed primes that are not 4n+3. The over lap is certainly interesting, though!

May 31st, 2016, 04:06 PM  #7 
Newbie Joined: May 2016 From: Maine Posts: 6 Thanks: 0 
Actually, I had a bug in my test code. The 4n+3 primes line up with the conjecture!

June 3rd, 2016, 07:38 PM  #8  
Senior Member Joined: Jul 2012 From: DFW Area Posts: 642 Thanks: 99 Math Focus: Electrical Engineering Applications 
I wrote a program (actually some programs) and I checked up to 100 million and I found no violations of your conjecture. I am currently running up to 1 billion and expect it to finish tomorrow. I will post the results. A run to 1 million took 4s, to 10 million took 83s, and to 100 million took 2029s. So I expect the 1 billion run to take about 60000s. This will be my last run, it is all yours after that, but at least your results have been verified up to 100 million (and hopefully a billion, tomorrow). Quote:
FYI, the program that I am running is written in C, and it uses the 'mpz_nextprime' function of MPIR (2.5.1) to get primes. Up to 100 million, it only misreported 18_790_021 as prime*, which it is not. The function uses statistical methods combined with MillerRabin tests (I think) to check for composites but sometimes composites pass through as primes. So 18_790_021 failed the middle CFE value test (and the $4n+3$ test) but a check here showed that it was composite. I assume that I will have to check some more numbers during the 1 billion run. If anyone is interested, I will post the code. *Other composite numbers may have been passed through as well, but if they were, the root CFE had an even number of terms (whole number plus repeating cycle, as you defined it), in which case no checks would have been made.  
June 4th, 2016, 04:36 PM  #9 
Senior Member Joined: Jul 2012 From: DFW Area Posts: 642 Thanks: 99 Math Focus: Electrical Engineering Applications 
The 1 billion run has completed and the 'middle coefficient' property described above was confirmed. It was also confirmed that all of the primes were of the form $4n+3$. Unfortunately, the way the program was structured, it did not check if other $4n+3$ primes had an even number of coefficients. So I restructured the program to check that if the prime is of the $4n+3$ form, it also has the 'middle coefficient' property. The run to 100 million is complete and so far all, and only, the $4n+3$ primes have this property. The 1 billion run is in progress. 
June 5th, 2016, 12:31 PM  #10 
Senior Member Joined: Jul 2012 From: DFW Area Posts: 642 Thanks: 99 Math Focus: Electrical Engineering Applications 
The 1 billion run is complete and to me it appears that all the numbers, and only the numbers in https://oeis.org/A002145 have this property.


Tags 
conjecture, continued fractions, partial, prime numbers, primes, property 
Search tags for this page 
Click on a term to search for related topics.

Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Interesting property of the Primes  Jopus  Number Theory  0  December 21st, 2015 02:19 PM 
Property of primes  USAMO Reaper  Number Theory  1  June 29th, 2015 09:15 PM 
Conjecture on cycle length and primes : prime abc conjecture  miket  Number Theory  5  May 15th, 2013 05:35 PM 
Twin primes conjecture  ibougueye  Number Theory  1  August 13th, 2012 08:24 PM 
New conjecture about primes ?  Bogauss  Number Theory  32  March 1st, 2012 06:30 AM 