OFFSET
1,1
COMMENTS
The primitive values of x^2 + x*y + y^2 where x >= y >= 0 and gcd(x, y) = 1 are given by A034017. However there are incidents in the sequence A034017 where different values of (x, y) yield the same primitive value. Furthermore, the number of solutions for a given primitive value equates to a power of 2. See A121940.
FORMULA
n such that n = x1^2 + x1*y1 + y1^2 = x2^2 + x2*y2 + y2^2 with x1 != x2, y1 != y2 and gcd(x1,y1) = gcd(x2,y2) = 1.
EXAMPLE
a(3) = 217 because it is the 3rd incident in ascending order of the primitive x^2 + x*y + y^2 that yields multiple solutions. This happens when (x, y) = (9, 8) and (13, 3).
MATHEMATICA
maxLen = 100; sol[k_] := Solve[m^2 + m*n + n^2 == k && m > n > 0 && GCD[m, n] == 1, Integers]; getlist[l_] := Which[Length[sol[l]] == 0, {}, True, {m, n} /. sol[l]]; list = {}; p = 1; While[Length[list] < maxLen, (While[Length[getlist[p]] < 2, p++]; list = Append[list, p]; p++)]; list
CROSSREFS
KEYWORD
nonn
AUTHOR
Frank M Jackson, Dec 06 2012
STATUS
approved