Hello everyone,

I'm sure this problem can interest some of you. I need the answers for a research project. I currently don't know the answers.

Let $\displaystyle n,m$ be two positive integers.
we consider this number

$\displaystyle D(n,m) = n^2 + nm + m^2 $

Let $\displaystyle S$ denote the sorted list of values which can be reached by $\displaystyle D(n,m)$.

For example :

$\displaystyle S_0 = D(0,0) = 0,$
$\displaystyle S_1 = D(0,1) = 1, $
$\displaystyle S_2 = D(1,1) = 3, $
$\displaystyle S_3 = D(0,2) = 4,$
$\displaystyle S_4 = D(0,3) = 9,$
$\displaystyle S_5 = D(2,2) = 12,...$

Now here come the questions :

Let $\displaystyle k$ be an integer.

- What is the value of $\displaystyle S_k$ ?

- How many different couples $\displaystyle (n,m)$ verify $\displaystyle D(n,m) = S_k $ ?

Let denote this number $\displaystyle t_k$.

- What is $\displaystyle \sum_{k=0}^{p} t_k $ ?

Let denote $\displaystyle s_p$ this last sum.

- For $\displaystyle s_p$ given, find the corresponding $\displaystyle p$. This last one should not be too hard to find if $\displaystyle s_p$ is found as an analytic function of $\displaystyle p$ (we just need to inverse it then), but I am not sure it's possible .

Many thanks for your help.