OFFSET
1,2
COMMENTS
Discriminant -32.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Naoki Uchida, Integers of the Form ax^2 + bxy + cy^2 (2020 preprint)
MATHEMATICA
ofTheFormQ[n_] := Reduce[n == 3*x^2 + 2*x*y + 3*y^2, {x, y}, Integers] =!= False; Select[Range[0, 400], ofTheFormQ] (* Jean-François Alcover, Jun 04 2014 *)
PROG
(PARI) is(n)=if(n==0, return(1)); my(h=valuation(n, 2), f=factor(n>>h), s); if(h==1, return(0)); for(i=1, #f~, if(f[i, 1]%8==3, s+=f[i, 2], f[i, 1]%8>3 && f[i, 2]%2, return(0))); h>1 || s%2 \\ Charles R Greathouse IV, Feb 10 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 02 2014
STATUS
approved