Valhalla Legends Archive

Member Forums => Yoni's Math Forum => Topic started by: Yoni on November 26, 2003, 04:29 PM

Title: Existence of mod 3 -> mod 2 polynomial?
Post by: Yoni on November 26, 2003, 04:29 PM
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?
Title: Re:Existence of mod 3 -> mod 2 polynomial?
Post by: Yoni on December 21, 2003, 06:26 PM
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)
Title: Re:Existence of mod 3 -> mod 2 polynomial?
Post by: 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.
Title: Re:Existence of mod 3 -> mod 2 polynomial?
Post by: Yoni on December 21, 2003, 07:03 PM
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.