← Complete problem index

PROJECT EULER · #0804

Counting Binary Quadratic Representations

Statement only · SolvedOriginal problem ↗

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

Define T(N)=n=1Ng(n). You are given T(103)=474 and T(106)=492128.

Find T(1016).

Write-up coming later

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