P890
projecteuler.net

Binary Partitions

ℹ️Published on Sunday, 12th May 2024, 02:00 am; Solved by 192;
Difficulty rating: 55%

Let $p(n)$ be the number of ways to write $n$ as the sum of powers of two, ignoring order.

For example, $p(7) = 6$, the partitions being $$ \begin{align} 7 &= 1+1+1+1+1+1+1 \\ &=1+1+1+1+1+2 \\ &=1+1+1+2+2 \\ &=1+1+1+4 \\ &=1+2+2+2 \\ &=1+2+4 \end{align} $$ You are also given $p(7^7) \equiv 144548435 \pmod {10^9+7}$.

Find $p(7^{777})$. Give your answer modulo $10^9 + 7$.



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.