Valhalla Legends Forums Archive | Yoni's Math Forum | Existence of mod 3 -> mod 2 polynomial?

AuthorMessageTime
Yoni
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?
November 26, 2003, 10:29 PM
Yoni
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)
December 22, 2003, 12:26 AM
Spht
Try A(n) = |sin(pi*n/3)|/(sqrt(3)/2).

Edit - Nevermind, I see you've already found one.
December 22, 2003, 12:30 AM
Yoni
[quote author=Spht link=board=36;threadid=3882;start=0#msg36664 date=1072053025]
Try A(n) = |sin(pi*n/3)|/(sqrt(3)/2).

Edit - Nevermind, I see you've already found one.
[/quote]
Nice try.
December 22, 2003, 1:03 AM

Search