Saturday, August 17, 2013

One more rule about Pythagorean triples

Yet again, let's consider Pythagorean triples, sets of three positive integers a, b and c such that a² + b² = c².  Here are several examples where all three numbers are less than 100.

3² + 4² = 5²
12² + 5² = 13²
15² + 8² = 17²
7² + 24² = 25²
9² + 40² = 41²
20² + 21² = 29²
48² + 55² = 73²

We know that we can generate Pythagorean triples using any two positive integers j and k with the formulas, where j > k with

a = j² - k²    b = 2jk and   c = j² + k²

This means there must be infinitely many different Pythagorean triples. If you aren't sure, consider k=1 and we get

a = j² - 1   b = 2j and  c = j² + 1

For any j > 1, we will get a unique Pythagorean triple.

Here's a pattern I noticed. Every triple on our list above has one number that is divisible by 5. Let us start with a speculation.

Speculation: Every Pythagorean triple has at least one number that is divisible by 5.

We could create a triple where all three numbers are divisible by 5 just by taking any Pythagorean triple and multiplying all the numbers by 5.

Example: Because  3² + 4² = 5², 15² + 20² = 25², The original numbers are 9 +16 = 25, and if we multiply all the numbers by 5, all the squares are multiplied by 25 and we get 225 + 400 = 625.

That explains why the modifier "at least" is used in the speculation.

Let's find facts that will help us prove the speculation.

Fact: The last digit of a square is determined by the last digit of the original number.

Think about multiplying two numbers that have two digits together, like 72 × 72. 

__72
_×72
_144
504 
5184

The ones place is just 2 × 2 and the 70 isn't involved. This would be true no matter how many digits in a number.

Fact: The last digit of a perfect square can only be 0, 1, 4, 9 or 6.

We can prove this by looking at the list of perfect squares of the numbers 0 through 9 (0, 1, 4, 16, 25, 36, 49, 64, 81) and using the first fact from above that the last digit of a number determines the last digit of the square.

Fact: The remainder of a perfect square when divided by 5 can only be 0, 1 or 4.

Because 10 = 2 × 5, the remainder upon division by 5 will look a lot like the last digit, except 6 becomes 1, and 9 becomes 4.

Fact: If you want to make a sum of two numbers from the set {0, 1, 4} to add up to 0, 1 or 4, there are only a finite number of patterns and not all of them work.

0 + 0 = 0 works
0 + 1 = 1 works
0 + 4 = 4 works
1 + 0 = 1 works
1 + 1 = 2 doesn't work
1 + 4 = 5 doesn't work, except when we divide 5 by 5 we get remainder 0, so it does work for us.
4 + 0 = 4 works
4 + 1 = 5  doesn't work, except when we divide 5 by 5 we get remainder 0, so it does work for us.
4 + 4 = 8 doesn't

Fact: Every pattern that works has a 0 or 5 in it.

Fact: A remainder of 0 when dividing by five means the number is divisible by 5.

Fact: Because 5 is prime, getting a perfect square that is divisible by 5 means the original number is divisible by 5.

This means our speculation about the Pythagorean triples is in fact a pattern that is always true. We could call it a "theorem", but I'm going to save that word for

Fact: Every Pythagorean triple has at least one number that is divisible by 5.

Here are two other facts that can be proved using similar methods, which the reader can try to prove if interested.

Fact: Every Pythagorean triple has at least one number that is divisible by 3.

Fact: Every Pythagorean triple has at least one number that is divisible by 2 and one number  divisible by 4.

We don't have any other primes for which this is true. That is proved simply by the triple 3, 4, 5. All the primes greater than 5 (7, 11, 13, 19, ...) do not divide any of these numbers evenly, so we have a single counter-example that works for an infinite number of cases, a situation a lazy mathematician is always happy to find.



Friday, August 16, 2013

Another New York City mayoral poll.

A new poll for the New York City races was released Thursday night, this one from Marist, yet another small East Coast college that does polling.(The earlier polls were from Qunnipiac and Siena, also small East Coast colleges.)



The latest poll, completed on August 14 sampling 679 Democrats, puts City Council Speaker Christine Quinn and public advocate Bill DiBlasio in a tie at 24% and former comptroller William Thompson in third with 16%.

The rules of the race are that if any single candidate polls over 40%, he or she is declared the winner and goes onto the general election. If not, the top two vote getters are in a run-off.

If the election were held when the poll was taken, one candidate getting over the 40% mark is highly unlikely, so it's really a race for the top two spots. A week ago, that looked like Quinn and Thompson, but the two polls this week say Quinn and DiBlasio. The event that is considered the turning point is the decision by a judge that "stop and frisk" policies are unconstitutional and DiBlasio's long held objection to the policy in New York City is his key advantage.

Marist also polled the Republican race, where Joe Lhota has a large lead but not polling over 40% yet. He could win without need for a run-off depending on how the undecided vote breaks, but he is not given a very good chance against whoever survives the Democratic race.

There will certainly be more polls between now and the election and I will give updates when available.

Thursday, August 15, 2013

Another rule about Pythagorean triples.


Last January, I wrote several posts about Pythagorean Triples, a set of three whole numbers a, b and c that follows the rule of the Pythagorean Theorem a² + b² = c². Here are some examples.

3² +4² = 5²
8² + 15² = 17²
24² + 7² = 25²

If we think about these numbers as sides of a triangle, the area will be ½ab. In the cases from above, the areas as 6, 60 and 84, respectively.

There is a way to generate all such whole number triples, using two positive integers j and k, with j>k.

a = j² - k²
b = 2jk
c = j² + k²

Our first rule is that we should stipulate that j does not equal k, because in the that case a = 0. Re-writing a and b in the area formula into multiples of j and k, we get this.

Area = ½ab = ½(j² - k²)2jk = (j² - k²)jk

Since j and k are whole numbers, the area must be a whole number. But more than that the number must be divisible by 6. The proof is split into two parts, first that the area is divisible by 2 and secondly that the area is divisible by 3.

Proof of the area is divisible by 2. If j or k is even, then (j² - k²)jk is even, since if you have a product of whole numbers and one is even, the product is even. The only other option is that both j and k is odd, and if that is the case then j² - k² = odd - odd = even.

Proof of the area is divisible by 3. If j or k is a multiple of 3, then (j² - k²)jk is a multiple of 3. The only other option is that neither j and k is a mulitple of 3. For any number n that isn't a multiple of 3,  n² will be of the form 3p + 1, which is to say one more than some multiple of 3. If that is the case then j² - k² = (3p + 1) - (3q + 1) = 3(p- q), which is a multiple of 3 as well.

Wednesday, August 14, 2013

More election news:
Results from New Jersey, new polls for New York City mayor


The results from the primary for the New Jersey special election came in and there were no surprises. Cory Booker won the Democratic nomination handily with 59% while his closest rival had 20%. Republican Steve Lonegan beat his single opponent Alieta Eck 79% to 21%.

The Booker vs. Lonegan election will be held on Wednesday, Oct. 16. Two months is a long time in politics, but currently Booker is leading comfortably in all the polls that have asked about this particular match-up.
  

The New York City mayoral race is much more up in the air. The Democratic primary polls taken this month by Siena and Quinnipiac don't agree on much except the fall of Anthony Weiner from the top tier of candidates.

The rules of the primary state that if a single candidate gets more than 40% of the vote, he or she is declared the winner. Otherwise the top two candidates are in a run-off. Here are the results for the top three candidates in the most recent polls.

Siena (8/2 to 8/7)
Quinn 25%
DiBlasio 14%
Thompson 16%

Quinnipiac (8/7 to 8/12)
DiBlasio 30%
Quinn 24%
Thompson 22%

My Confidence of Victory method does have ways of turning each of these sets of numbers into probabilities of victory for all three of these candidates, and as you might expect the Siena numbers from earlier in the month would make Quinn the prohibitive favorite while the Quinnipiac number would hand the big favorite role to DiBlasio.

Quinn has been the favorite for several months, never polling less than second. Similar to the 2012 Republican presidential primary, there is a remarkable amount of what I call "churn" in the numbers. If I stretched the analogy a little farther (perhaps too far, I can't be sure), this would put Christine Quinn, the openly gay speaker of the New York City Council in the role of Romney, while Weiner and DiBlasio, the  New York City public advocate and considered the most liberal candidate, in the roles of the many Not Romneys that the Republican field had to offer.

The last five elections for mayor have been won by a Republican (Giuliani) and a former Republican turned Independent (Bloomberg), but the current assumption is that the star power is gone from the Republican ranks currently and the Democratic primary winner will move to Gracie Mansion.

I've read analyses by Harry Enten and Nate Silver, both of whom are very keen on historical track records. Maybe it's because I'm older than either of them or I've just seen so many predictions done on flimsy data turn out so badly, but I'm not convinced the historical record is the right thing to look at. An issue like "stop and frisk" has a strong chance to be a game changer, and that would work to DiBlasio's advantage.

Enten believes it's all about ethnic politics, which gives Thompson,who is black, an edge over DiBlasio. Silver thinks Quinn's position as front runner for most of the year gives her the inside track. I claim no expertise about New York politics, but I believe more strongly in event driven elections being the correct modern model and that historical data is often so much balloon juice.

I'll post again when there is new data.

I will keep track of these races through the primary on September 10, the likely run-off on October 1 and the general election on November 5.

Wednesday, August 7, 2013

The not much election news to report.


My Internet crashed on the day of the reporting of the Massachusetts special Senate election. My prediction said Ed Markey looked like a prohibitive favorite and he won. The median poll said he was leading by seven to ten points, he won by ten.

The other two elections in the news are the governor's race in Virginia and the special Senate election in New Jersey. There hasn't been any news since the middle of July in Virginia, where McAuliffe is still leading in the median polls.


There is news from New Jersey, but it is of zero interest to those who want an exciting race. Newark mayor Cory Booker has a huge lead in the Democratic primary and former Bogota mayor Steve Lonegan looks to be a shoo-in in the Republican primary. In the general election, Booker has a massive lead as well, though there is a long time between now and the October 16 special election, strangely scheduled for a Wednesday.

Thursday, August 1, 2013

inifinite sums of power series

Yesterday, it was shown that 1/2 + 1/4 + 1/8 + ... = 1. Today we are going to look at the power series for any number x between -1 and 1 (not including 0) for x^0 + x^1 + x^2 + ...

We are going to use a trick called telescoping.

(1 - x)(1 + x + x²) can be split the positive terms and the negative terms.

Positive: 1 + x + x²
Negative: - x - x² - x³

The two of the positive and negative terms cancel out and we are left with just  1 - x³.

If we have a number x between -1 and 1, as the powers increase towards infinity the number gets closer to zero. Dividing both sides by (1 - x) tells us the sum will be equal to 1/(1 - x).

For example, if x = ½, the sum 1 + 1/2 + 1/4 + 1/8 + ... = 1/(1 - ½) = 1/½ = 2.

if x = -½, the sum 1 - ½ + 1/4 - 1/8 + ... = 1/(1 - (-½)) = 1/(3/2) = 2/3.

There are many other methods used in infinite sums, but this is one of the most basic.
 

Wednesday, July 31, 2013

An short introduction to infinite sums.


On first blush, it might seem that if you add an infinite number of positive numbers together, the sum must be unbounded. But if the numbers are getting small enough fast enough, the sum of an infinite series can be both finite and exactly defined.

Probably the simplest infinite sum is the powers of ½. Let's say that half of a room is painted in the first hour, and half of what remains is painted in the second hour, so now 3/4 of the room is painted. For reasons unknown, you decide to let this increasingly lazy person continue their plan of painting less and less each hour, one eighth in the third hour, one sixteenth in the fourth hour, on and on infinitely. I say infinitely because mathematically the room is never finished. (In reality, we will get to a sliver so tiny that it must be painted completely, if only because a molecule of paint once split isn't a molecule of paint anymore.)

In math, this is well understood now to be an infinite sum that adds up to 1. You might fairly say "we never get there", which is true. This was the point of one of the famous paradoxes of the ancient Greek mathematician and philosopher Zeno. But in modern math we have the concept of a limit as n approaches infinity. We can agree that the sum never gets to be more than 1, and the idea of a limit is that you get to choose how close you want the sum to be to 1 and I have to give a number of steps which will guarantee a sum that is closer than your given definition of "close enough". For example, if we want the sum to be within one millionth of 1, which is to say larger than .999999 but still less than 1, I can guarantee that after twenty steps, the sum will be that large, because ½ raised to the twentieth power is slightly less than one millionth.

Tomorrow, one of the tricks used for the general power series of positive numbers less than 1.