OFFSET
1,1
COMMENTS
Inspiration was the equation x^2 + x + x*y + y + y^2 = a^2 + b^2 + c^2 where x, y, a, b and c are integers.
Complement of this sequence is 0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 14, 16, 17, 20, 21, 22, 24, 25, 26, 30, 32, 33, 34, 36, 37, 40, 41, 42, 44, 46, 49, 50, 52, 54, 56, 57, 58, 64, 65, 66, 69, 70, 72, 74, 76, 80, 81, 82, 85, 86, 89, 90, 94, 96, ...
EXAMPLE
60 is a term because 60 = 6^2 + 6 + 6*2 + 2 + 2^2 and there is no integer values of a, b and c for the equation 60 = a^2 + b^2 + c^2.
50 is not a term because 50 = 6^2 + 6 + 6*1 + 1 + 1^2 = 3^2 + 4^2 + 5^2.
MATHEMATICA
Select[Range@ 2000, And[Resolve[Exists[{x, y}, Reduce[# == x^2 + x + x y + 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 *)
PROG
(PARI) isA003136(n) = #bnfisintnorm(bnfinit(z^2+z+1), n);
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, ", ") ; ) ; ) ; }
for(n=0, 2000, if(isA003136(3*n+1) && isA004215(n), print1(n, ", ")));
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Jan 15 2016
STATUS
approved