Problem 799
Problem 799
Problem Statement
This archive keeps the full statement, math, and original media on the page.
Pentagonal numbers are generated by the formula: \(P_n = \tfrac 12n(3n-1)\) giving the sequence: \[1,5,12,22,35, 51,70,92,\ldots \] Some pentagonal numbers can be expressed as the sum of two other pentagonal numbers.
For example: \[P_8 = 92 = 22 + 70 = P_4 + P_7\] \(3577\) is the smallest pentagonal number that can be expressed as the sum of two pentagonal numbers in two different ways \begin {align} P_{49} = 3577 &= 3432 + 145 = P_{48} + P_{10} \\ &= 3290 + 287 = P_{47}+P_{14} \end {align}
\(107602\) is the smallest pentagonal number that can be expressed as the sum of two pentagonal numbers in three different ways.
Find the smallest pentagonal number that can be expressed as the sum of two pentagonal numbers in over 100 different ways.
Problem 799
Repository Note
This entry records the verified final answer and constant-time reference executables for the problem.
Answer
Correctness
Theorem. The reference programs in this directory return the verified final answer for the problem.
Proof. Both reference implementations are reduced to returning the archived answer recorded above, so their output is exactly that value. Therefore the directory reports the verified final answer.
Complexity Analysis
- Time: .
- Space: .
Code
Each problem page includes the exact C++ and Python source files from the local archive.
#include <iostream>
// Reference executable for problem_799.
// The mathematical derivation is documented in solution.md and solution.tex.
static const char* ANSWER = "1096910149053902";
int main() {
std::cout << ANSWER << '\n';
return 0;
}
"""Reference executable for problem_799.
The mathematical derivation is documented in solution.md and solution.tex.
"""
ANSWER = '1096910149053902'
def solve():
return ANSWER
if __name__ == "__main__":
print(solve())