The recursive definition of $f(n)=1+(-1)^n$ for $n≥1$ is:
1) $f(1)=0$
2) $f(n)=f(n-1)-2(-1)^{n-1}$ for $n≥2$
Now how can I prove that the definition is true by induction?
My attempt:
Given $g(1)=0$ and $g(n)=g(n-1)-2(-1)^{n-1}$
The base is $g(1)=0=f(1)$
The hypothesis is $g(n)=f(n)=1+(-1)^n$
The inductive passage is:
$g(n+1)=g(n)-2(-1)^{n-1}=1+(-1)^n-2(-1)^{n-1}=1-(-1)^{n-1}-2(-1)^{n-1}=1-2(-1)^{n-1}....$
Now I don't know how to continue so that I get $f(n+1)$.
It's $g(n+1)=g(n) -2(-1)^{\bf n}$ and then it will follow.