I'm looking for a polynomial P(x) with the following properties:
1. P(N) is partial to N. Meaning, if n is a natural number, P(n) is natural as well.
2. If n is divisible by 3 (n mod 3 = 0), then P(n) is even (P(n) mod 2 = 0).
3. If n isn't divisible by 3 (n mod 3 = 1, or n mod 3 = 2), then P(n) is odd (P(n) mod 2 = 1).
So far I haven't been able to find one or prove the inexistence of one. Any ideas?
Not a polynomial, but I found a magnificent solution to my problem!
A(n) = |sin(pi*n/3)|/(sqrt(3)/2)
Gives the following sequence:
1, 1, 0, 1, 1, 0, 1, 1, 0, (repeats infinitely)
Try A(n) = |sin(pi*n/3)|/(sqrt(3)/2).
Edit - Nevermind, I see you've already found one.
Quote from: Spht on December 21, 2003, 06:30 PM
Try A(n) = |sin(pi*n/3)|/(sqrt(3)/2).
Edit - Nevermind, I see you've already found one.
Nice try.