Need help finding a generating function

67 Views Asked by At

I need to find the generating function for $a_n$ where:

$$a_{2k}=\dfrac{(-1)^k}{(2k)!}$$

$$a_{2k+1}=\dfrac{1}{(2k+1)}$$

$$k \geq 0$$

The solution is:

$$f(x)=\cos(x)+\operatorname{atanh}(x)$$

So far I've solved problems where everything began with a recurrence relation that I had to multiply with something to get sums (and substitute with $f(x)$).

I'm not sure how to even express $a_n$ here. I'd appreciate any help.