(In reply to
re: my solution by Charlie)
The solution for odd n works in any base x because
(x^(n) + x^(n-1)+ ... + x^2 + x + 1) times
(x^(n) - x^(n-1) + ... + x^2 - x + 1) equals
x^(2n) + x^(2n-2) + ... + x^2 + 1)
You can similarly prove for even n that it will never work
(x^(2n) + x^(2n-2) + ... + x^1 + 1) divided by
(x^(n) + x^(n-1) + ... + x + 1)
both reduce by a factor of (x^(n-1) + x^(n-3) + ... + x^2 + 1) to become
(x^(n-1) + 1) / (x+1)
by synthetic division since n-1 is odd the remainder ends up as 1+1=2 [instead of 1-1=0 when n-1 is even. Come to think of it this is an alternate way of showing the first case works.]
|
Posted by Jer
on 2011-01-13 15:28:43 |