OFFSET
1,1
COMMENTS
LINKS
FORMULA
EXAMPLE
a(1) = 7 as 7^2 = 3^2 + 3*5 + 5^2.
MATHEMATICA
r[k_] := Reduce[x>0 && y>0 && k^2 == x^2 + x y + y^2, {x, y}, Integers];
selQ[k_] := Which[rk = r[k]; rk === False, False, rk[[0]] === And && Length[rk] == 2, False, rk[[0]] === Or && Length[rk] == 2, True, True, False];
Select[Range[1000], selQ] (* Jean-François Alcover, Feb 20 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jean-Christophe Hervé, Nov 24 2013
STATUS
approved