Search Problems   RSS Feed
projecteuler.net

Counting Binary Quadratic Representations

 Published on Saturday, 25th June 2022, 05:00 pm and solved by 978
Difficulty: Level 11 [30%]

Problem 804

Let $g(n)$ denote the number of ways a positive integer $n$ can be represented in the form: $$x^2+xy+41y^2$$ where $x$ and $y$ are integers. For example, $g(53)=4$ due to $(x,y) \in \{(-4,1),(-3,-1),(3,1),(4,-1)\}$.

Define $\displaystyle T(N)=\sum_{n=1}^{N}g(n)$. You are given $T(10^3)=474$ and $T(10^6)=492128$.

Find $T(10^{16})$.



Copied to Clipboard