tmp = 
      Expand[(1 - t1 B - t12 (B^12) - t13 (B^13)) ((B^k) - 
              t1 (B^(k + 1)) - t12 (B^(k + 12)) - 
              t13 (B^(k + 13)))]

Coefficient[tmp/(B^k), B]

Coefficient[tmp/(B^k), (B^2)]

f[p_] := Coefficient[tmp/(B^k), (B^p)]
Map[f, Range[1, 26]]

f[25]