Pat B. wrote a response to my last post on the number 867-5309.

In that post I pointed out that:

- 8675309 is a prime.
- 8675309 is a twin prime (8675311 is also prime).
- 8675309 is the hypotenuse of a (primitive) Pythagorean triple: 8675309
^{2}= 2460260^{2}+8319141^{2}.

Pat asked:

What is the smallest number that would meet all three conditions above, that is it is a twin prime and it is also the hypotenuse of a primitive Pythagorean triple…. Ok, way to easy … what is the NEXT smallest?

Well, after some failed attempts to get WolframAlpha to answer the question for me, I decided to go at it the old fashioned (i.e., pre-2009) way. Google the terms, get lists of twin primes and primitive Pythagorean triples, and start checking by hand.

What I found was that there are **many** twin primes that are also hypotenuses of Pythagorean triples. In fact, all of the first 35 twin prime pairs had one twin which was such a hypotenuse. For example:

(3,5) ~ (3,4,5)

(5,7) ~ (3,4,5)

(11,13) ~ (5,12,13)

(17,19) ~ (8,15,17)

(29,31) ~ (20,21,29)

(41,43) ~ (9,40,41)

(59, 61) ~ (11,60,61)

(71,73) ~ (48,55,73)

(101, 103) ~ (20,99,101)

(107, 109) ~ (60,91,109)

(137, 139) ~ (88,105,137)

(149, 151) ~ (51,140,149)

~ skip some pairs ~

(881, 883) ~ (369,800,881)

I am not a number theorist, so I don’t know if this has any significance or not. I do know that if the hypotenuse in a Pythagorean triple is prime, then it must have the form 4n+1. So that explains why we don’t see **both twins** of a twin prime pair in a Pythagorean triple.

So let me ask my own question: what is the smallest twin prime pair (p,q) such that neither p nor q is the hypotenuse of a Pythagorean triple?

All primes of the form 4n+1 can br expressed as a sum of 2 squares. This result goes back to Fermat. (That’s the fellow whose famous conjecture was proved a few years back.)

I looked up a proof of the 4n+1 prime theorem.

But, it’s just a little too long to include here.

By:

Michael Welfordon August 27, 2009at 12:28 am

I am not sure that is possible. In any pair of twin primes, one of them must be congruent to 1 mod 4, and any prime congruent to one mod 4 can be written as the sum of two squares, r^2 + s^2, say, (I think you can use Gaussian integers to prove this) which means that the numbers r^2+s^2, 2rs and r^2-s^2 (assuming that r>s) form a Pythagorean triple, with r^2+s^2 the hypotenuse.

By:

Cathyon August 27, 2009at 6:37 am

Very nice! Thank you both for putting that to rest! Number theory never ceases to amaze me.

By:

Dave Richesonon August 27, 2009at 8:49 am

[...] read this follow-up post.] Possibly related posts: (automatically generated)Google Voice will let you change your phone [...]

By:

867-5309; more than Jenny’s phone number « Division by Zeroon August 27, 2009at 9:46 am

[...] Dave Richeson writes about the prime , twin primes and Pythagorean triples. [...]

By:

Carnival of Mathematics #56 « Reasonable Deviationson August 28, 2009at 3:44 am

IS there such a thing as a twin primes in which neither prime is a Pythagorean hypotenuse? If the smaller of the pair is 4k+1, the larger is 4k+3. If the smaller is 4k+3, then the larger is 4k+5 or 4k+4+1 or 4(k+1)+1 or 4v+1. Since any prime 4v+1 is a Pythagorean hypotenuse, one twin prime is always a Pythagorean hypotenuse. Do you agree? Or have I overlooked something?

By:

dccon April 4, 2012at 9:02 am

[...] fun (from hereĀ and here) is that it (8675309) is also a twin prime (it’s prime and so is 8675311). Since [...]

By:

867-5309 « Petuniason April 25, 2012at 2:08 pm

If you take a primitive Pythagorean triple and add each side’s square to the distance from the closest number between two twin primes, that equation will also be true, and divide evenly by at least six.

For example, 21^2+20^2=29^2. For 21^2, the next twin primes are 461 and 463 (20 and 22 away) so add 21. Do the same for the other sides and you get (21^2+21)+(20^2+20)=(29^2+41), or 462+420=882.

By:

Kirbyon May 26, 2014at 11:22 pm