P.S. there are formulas for the values for arbitrary powers.
That's cool and understandable.
I was thinking maybe you used
Did you use a rectangle centered at the origin with along the real axis and along the imaginary axis?.
I have seen it donw this way with
The residue at 0 is
I played around a little and combined the residues at -k and k into:
Like I said, just playing around. CA is not my forte, but I enjoy it. It is a powerful tool. What I have learned is self-taught, so if there is a booboo I am here to learn as well as help.
Another way to find the general expression for is to expand in a Laurent series about 0 using the usual series expansion (whose coefficients are the Bernoulli numbers). Then expand it in another way using the identity . Switching the sums and gathering like powers, we obtain after comparing coefficients in both expansions.