How to find the value of f(2023)+f(2024) ?

Given that the function f(x)
has a domain of R
and for any x,y∈R
, the equation f(x−y)⋅f(x+y)=(f(x)−f(y))⋅(f(x)+f(y))
always holds true. Moreover, it is given that f(1)=2
and f(2)=0
. We are asked to find the value of f(2023)+f(2024)
.

I tried this method and did not succeed in finding it.

RecurrenceTable[{f[x - y] f[x + y] == (f[x] - f[y]) (f[x] + f[y]), 
  f[1] == 2, f[2] == 0}, f, {x, 2024}, {y, 2024}]

You could start by proving that f[n] must be zero for all even n.

A brute force way is to plug in integer values for x and y and you’ll find that f(x)=0 for even x. For odd x you’ll find that f(x)=-2 i^{x+1}. One such real valued function that has such properties is \sin \left(\frac{\pi x}{2}\right).

f[x_] := Sin[\[Pi]  x/2]
f[x - y]  f[x + y] == (f[x] - f[y])  (f[x] + f[y]) // FullSimplify
(* True *)