OFFSET
1,1
COMMENTS
Motivation for this sequence is the equation x^2 + x*y + y^2 = a^2 + b^2 + c^2 where x, y, a, b and c are integers.
Löschian numbers of the form a^2 + b^2 + c^2, where a, b and c are integers, are 0, 1, 3, 4, 9, 12, 13, 16, 19, 21, 25, 27, 36, 37, 43, 48, 49, 52, 57, 61, 64, ...
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
7 is a term because it is a Löschian number and there is no integer values of a, b and c for the equation 7 = a^2 + b^2 + c^2.
Löschian number 19 is not a term because 19 = 5^2 + 5*(-2) + (-2)^2 = 1^2 + 3^2 + 3^2.
MATHEMATICA
Select[Range@ 900, And[Resolve[Exists[{x, y}, Reduce[# == x^2 + x y + y^2, {x, y}, Integers]]], !Resolve[Exists[{x, y, z}, Reduce[# == x^2 + y^2 + z^2, {x, y, z}, Integers]]]] &] (* Michael De Vlieger, Jan 15 2016, after Jean-François Alcover at A003136 *)
PROG
(PARI) isA004215(n) = {my(fouri, j) ; fouri=1 ; while( n >=7*fouri, if( n % fouri ==0, j= n/fouri -7 ; if( j % 8 ==0, return(1) ) ; ) ; fouri *= 4 ; ) ; return(0) ; } {for(n=1, 400, if(isA004215(n), print1(n, ", ") ; ) ; ) ; }
isA003136(n) = #bnfisintnorm(bnfinit(z^2+z+1), n);
for(n=0, 1e3, if(isA004215(n) && isA003136(n), print1(n, ", ")));
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Jan 15 2016
STATUS
approved