POW #7 Twin Pairs
In the Twin Pair problem, we were tasked with the problem of looking at prime numbers that had a difference of two. These are called "Twin Primes". Twin primes have some interesting qualities. Our job was to make an equation or formula to solve for the product of the pair of twin primes plus one. Along with that, we were tasked with just identifying twin primes and their qualities.
In order to solve the problem, I first solved for the product +1 multiple times with different sets of twin primes to see if I could find patterns. I started with the twin primes (17,19) and went up from there to complete a total of 6 different examples. First I took the twin primes, multiplied them together, and then added one to that answer. I found that if you took the square root of the sum, you would get the whole number in-between the two twin primes. For example, 17 times 19 is 323. 323 +1=324. The square root of 324 is 18. In order to solve the problem, I also broke down the process I took to solving the problems and looked at it systematically so that it would be easier to create a formula in the long run. Some other things I noticed from the 6 examples is that if you took the product +1 and divided it by 36, you would always be greeted with a perfect square. (For example 324/36=9, 900/36=25 ect.). I believe this is due to the fact you are taking a pre-existing perfect square, and then dividing it by another perfect square(36=6^2). I looked for a while in order to find an equation that would bind this property so I could easily predict the next set of twin primes. I could not find the answer out, but later I found this table on the internet.
It seems like the possibility of a twin prime follows a +2 +4 +10 +2 +10 format. And every possibility skips the 30 down as well for another possibility. For example, 11,41,71,101,131 are all possibilities. The problem though comes out to that it does not exactly follow the +2 +4 +10 +2 +10 and often it skips pairs
In order to come up with the solution to the problem, I turned my formula into a system of if;else statements. This is due to the fact that there are several different possibilities that yield different outcomes. Based on if "p" (the original prime) was the high or low prime number (or any prime at all in that case), different equations work. Look above on the bottom part of the picture of my workspace in order to find the full if;else statement. The solution is comprised of two main formulas (p-1)^2 or (p+1)^2. This is due to the fact that the middle of the two twin primes is the square root of the product +1.
From this problem, I learned how to look at a generally abstract problem, look for patterns, and then formulate an equation and generalize it into a few sets of data. I worked this problem a little far, and went down a few wrong turns that I was unable to solve just by my head. I feel as if I deserve full credit on my POW because I completed all of the work and went above and beyond. I used the Habit of a Mathematician looking for patterns and starting small. I used looking for patterns because I was trying to formulate an equation in order to solve the POW. Patterns are key to finding formulas. I used starting small by breaking apart the problem in order to solve each part individually.