# Finding a real value of $p$

I am a bit confused about approaching this problem,

Let $g(x)$ be a function such that $g(x + 1) + g(x − 1) = g(x)$ for every real $x$. Then for what value of p is the relation $g(x + p) = g(x)$ necessarily true for every real $x$?

The four options given are $5,3,2 \text{ and } 6$.Please explain your answer.

-
This cannot be difficult - there are only a small number of cases to try. Hint: rewrite $g(x + 1) + g(x − 1) = g(x)$ as $g(x + 1) = g(x) - g(x − 1)$ and use it to express $g(x+r)$ in terms of $g(x)$ and $g(x-1)$. – Mark Bennet Jun 27 '11 at 6:20
It would be nice if $0$ were a choice... – Ross Millikan Jun 27 '11 at 13:35

Note that $$g(x+1) = g(x)-g(x-1)$$ for all $x$.
So $g(x+2) = g((x+1)+1) = g(x+1)-g(x) = g(x)-g(x-1)-g(x) = -g(x-1)$. Replacing $x$ with $x+1$ we get $g(x+3)=-g(x)$ for all $x$.
So $g(x+6) = -g(x+3) = -(-(g(x))) = g(x)$. So the answer is $6$.
(We already had that $2$ does not work; if you want to see why $5$ doesn't work, we have $g(x+5) = -g(x+2) = -(-g(x-1)) = g(x-1)$).