## Tuesday, November 29, 2011

### Flag Generator

I had this idea as a way to generate some AC electricity. Basically as a flag ripples in the wind it is connected to a framework of springs that will tend to oscillate at their resonant frequency. This oscillation is converted to electricity by moving a magnet through a coil. The picture might help:
If you've ever held a flag in the wind you'll know that even a moderate breeze can get it jerking your arms pretty hard. Ideally you'd want to construct the flag so it ripples at the same frequency to a given wind speed that the spring's vibrate when you press and release one. In the picture above the magnet is connected to the bar that the flag is on I wasn't sure how to make that clearer.

Update:
This is the first prototype. I'm ordering the wire for the electrical part and it's a little tough to see in the video because it was nighttime, but basically I've got a plastic streamer inducing a vibration in the springs that I'll try and capture the electricity from. The second part of the video I'm just showing how the springs thread onto the screws.

## Monday, November 21, 2011

### Prime number wave

I never knew if this was possible or not but apparently so. I started with considering an infinite square wave only 0 every say, 3rd number and then multiplying all the waves of that type gives this nice wave that is only 1 where t doesn't divide any number but 1 and itself. In other words it is prime. In practice there are easier ways to find the prime numbers but I still think this function is interesting.

## Friday, November 4, 2011

### Tell if a series is generated by a Polynomial with integer coefficents

Theorem: A series of integers is generated by a polynomial P(x) with integer coefficients if for every choice of x:
m mod P(x) = m mod P(x+m)
Proof: Consider the polynomials:
P(x) = a*x^n + b*x^(n-1) + ... + k
P(x+m) = a*(x+m)^n + b*(x+m)^(n-1)+...+k
When P(x+m) is expanded, there are two types of terms, those that do not contain m and those that do. The collection of terms that do not contain m are exactly those terms found in P(x). The rest we said all divide m. Therefore:
P(x+m) = P(x) + m*(B(x)) for some polynomial B(x) with integer coefficients.
So whatever the remainder of P(x) when divided by m is, because m*(B(x)) divides m evenly and B(x) is an integer at any x,  P(x+m) will have the same remainder when divided by m.

In practice what that means is if you look at a series of integers, and then the remainders when divided by for example 3, if it produces a pattern that repeats over and over again every 3 remainders it is produced by a polynomial with integer coefficients.
For example:
3*x^3 + 2*x^2 + x + 4 for x from 1 to 10 has remainders when divided by 3 of:

1,2,1,1,2,1,1,2,1

This pattern repeats every 3 as it should.

Try a random series:
5,12,21,27,35,45
The remainders when divided by 3:
2,0,0,0,2,0
Since this pattern does not repeat every 3 it can't be formed by any polynomial with integer coefficents. Of course there is a polynomial going through these 6 points for x from 0 to 6 but it is:
5-(7/6)*x+(5/3)*x^4+(43/3)*x^2-(185/24)*x^3-(1/8)*x^5
It doesn't have all integer coefficients.

Now I'm not sure if this result has ever been discovered before, thanks to Dr. Rose for the idea for the proof that I've tried to generalize here.