On line (?) 26, i think it should be

(-1)^k

instead of

(-1)^k+1

Not sure if i'm right or just missing something...
anyway very interesting and useful article thank you