← Complete problem index

PROJECT EULER · #0169

Sums of Powers of Two

Statement only · SolvedOriginal problem ↗

Define f(0)=1 and f(n) to be the number of different ways n can be expressed as a sum of integer powers of 2 using each power no more than twice.

For example, f(10)=5 since there are five different ways to express 10:

1+1+81+1+4+41+1+2+2+42+4+42+8

What is f(1025)?

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.