Is there any algorithm to find out that how many ways are there for write a number for example n , with sum of power of 2 ?
example : for 4 there are four ways :
A recursive definition of the sequence (from Peter's link to A018819):
f(n) = 1 if n = 0, Sum(j = 0..[n/2], f(j)) if n > 0 http://mathurl.com/nuaarfm.png