A300303 Squares that are not of the form x^2 + x*y + y^2, where x and y are positive integers.
0, 1, 4, 9, 16, 25, 36, 64, 81, 100, 121, 144, 225, 256, 289, 324, 400, 484, 529, 576, 625, 729, 841, 900, 1024, 1089, 1156, 1296, 1600, 1681, 1936, 2025, 2116, 2209, 2304, 2500, 2601, 2809, 2916, 3025, 3364, 3481, 3600, 4096, 4356, 4624, 4761, 5041, 5184, 5625, 6400, 6561, 6724, 6889, 7225, 7569
Offset: 1
Examples
Loeschian number 25 = 5^2 is a term because 25 = x^2 + x*y + y^2 has no solution for positive integers x, y.
Programs
-
Maple
isA024614:= proc(n) local x,y; for x from 1 to floor(sqrt(n-1)) do if issqr(4*n-3*x^2) then return true fi od: false end proc: isA024614(0):= false: remove(isA024614, [seq(i^2,i=0..200)]); # Robert Israel, Mar 02 2018
-
Mathematica
sol[s_] := Solve[0 < x <= y && s == x^2 + x y + y^2, {x, y}, Integers]; Select[Range[0, 100]^2, sol[#] == {}&] (* Jean-François Alcover, Oct 26 2020 *)
-
PARI
is(n,m)=issquare(n,m)&&!setsearch(Set(factor(m)[,1]%6),1) \\ second part is equivalent to is_A230780(m), this is sufficient to test (e.g., to produce a list) if we know that n = m^2. - M. F. Hasler, Mar 04 2018
Formula
a(n) = A230780(n-1)^2 for n > 1.
Comments