A232437 Numbers whose square is expressible in only one way as x^2+xy+y^2, with x and y > 0.
7, 13, 14, 19, 21, 26, 28, 31, 35, 37, 38, 39, 42, 43, 52, 56, 57, 61, 62, 63, 65, 67, 70, 73, 74, 76, 77, 78, 79, 84, 86, 93, 95, 97, 103, 104, 105, 109, 111, 112, 114, 117, 119, 122, 124, 126, 127, 129, 130, 134, 139, 140, 143, 146, 148, 151, 152, 154, 155, 156, 157, 158, 161
Offset: 1
Keywords
Examples
a(1) = 7 as 7^2 = 3^2 + 3*5 + 5^2.
Links
Crossrefs
Programs
-
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 *)
Comments