# Compute the value of the infinite series `sum_(k=0)^oocos(k pi/4)/2 ^k `. Express your answer in simplified radical form. The numerator is periodic with the period of 8, and its values starting from `k = 0 ` are `1 , ` `1 / sqrt ( 2 ) , ` 0, `-1 / sqrt ( 2 ) , ` -1, `-1 / sqrt ( 2 ) , ` 0, `1 / sqrt ( 2 ) .`

Because of this, the initial sum can be represented as the sum of 8 summands, only 6 of which are nonzero: `sum_(k=0)^(oo) cos(k pi/4) / 2^k = sum_(n=0)^(oo) 1/ 2^(8n) + 1 / sqrt ( 2 ) sum_(n=0)^(oo) 1/ 2^(8n+1) - 1 / sqrt ( 2 ) sum_(n=0)^(oo) 1/ 2^(8n+3) - sum_(n=0)^(oo) 1/ 2^(8n+4) - 1 / sqrt ( 2 ) sum_(n=0)^(oo) 1/ 2^(8n+5) + 1 / sqrt ( 2 ) sum_(n=0)^(oo) 1/ 2^(8n+7) .` Each sum is a multiple of `s = sum_(n=0)^(oo) 1 / 2^(8n) = sum_(n=0)^(oo) 1 / (2^8)^n = 1 / ( 1 - 1 / 256 ) = 256 / 255 .`

Specifically, `sum_(k=0)^(oo) cos(k pi/4) / 2^k = s (1+1/(2sqrt(2))-1/(8sqrt(2))-1/16-1/(32sqrt(2))+1/(128sqrt(2))),`

which is equal to
`256/255*1/256 ( 256 + 64sqrt(2) - 16sqrt(2) - 16 - 4sqrt(2) + sqrt(2)) =` `= 1/255 ( 240 + 45sqrt(2) ) = 1/17 (16 + 3sqrt(2)) .`