%I #58 Feb 17 2022 11:40:26
%S 7,37,43,67,79,109,127,151,163,193,211,277,331,337,373,379,421,457,
%T 463,487,499,541,547,571,613,631,673,709,739,751,757,823,877,883,907,
%U 919,967,991,1009,1033,1051,1087,1093,1117,1129,1171,1201,1213,1297,1303
%N Duplicate of A139492.
%C Name was: Primes of the form x^2 + 3*x*y - 3*y^2 (as well as of the form x^2 + 5*x*y + y^2).
%C Discriminant = 21. Class number = 2. Binary quadratic forms a*x^2 + b*x*y + c*y^2 have discriminant d = b^2-4ac and gcd(a,b,c)=1 (primitive).
%C Primes of the form 6n+1 which cannot be expressed as 7k-1, 7k-2, or 7k-4. a(n)^2 == 1 (mod 24). - _Gary Detlefs_, Jan 26 2014
%C Besides 7 (which divides 21), primes of the form p == 1 (mod 3) and either == 1 or 2 or 4 (mod 7). For the other class, the primes represented by the principal form [3, 3, -1] (or primitive forms equivalent to this) are besides 3 (which divides 21), congruent to 2 (mod 3) and also to 3, 5, 6 (mod 7). For the primes of both classes see A038893. - _Wolfdieter Lang_, Jun 19 2019
%D Z. I. Borevich and I. R. Shafarevich, Number Theory.
%H Vincenzo Librandi, <a href="/A141159/b141159.txt">Table of n, a(n) for n = 1..1000</a>
%H Peter Luschny, <a href="https://oeis.org/wiki/User:Peter_Luschny/BinaryQuadraticForms#Implementation">Binary Quadratic Forms</a>
%H N. J. A. Sloane et al., <a href="https://oeis.org/wiki/Binary_Quadratic_Forms_and_OEIS">Binary Quadratic Forms and OEIS</a>: Index to related sequences, programs, references. OEIS wiki, June 2014.
%H D. B. Zagier, <a href="https://doi.org/10.1007/978-3-642-61829-1">Zetafunktionen und quadratische Körper</a>, Springer, 1981.
%e a(1)=7 because we can write 7 = 2^2 + 3*2*1 - 3*1^2 (or 7 = 1^2 + 5*1*1 + 1^2).
%p f:=n->7*ceil((6*n+1)/7)-(6*n+1):for n from 1 to 220 do if isprime(6*n+1) and f(n)<>1 and f(n)<>2 and f(n)<>4 then print(6*n+1) fi od. # _Gary Detlefs_, Jan 26 2014
%t xy[{x_,y_}]:={x^2+3x y-3y^2,y^2+3x y -3x^2}; Union[Select[Flatten[xy/@ Subsets[ Range[50],{2}]],#>0&&PrimeQ[#]&]] (* _Harvey P. Dale_, Feb 17 2013 *)
%o (Sage) # uses[binaryQF]
%o # The function binaryQF is defined in the link 'Binary Quadratic Forms'.
%o Q = binaryQF([1, 3, -3])
%o Q.represented_positives(1326, 'prime') # _Peter Luschny_, Jun 24 2019
%K dead
%O 1,1
%A Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (laucabfer(AT)alum.us.es), Jun 12 2008
%E More terms from _Harvey P. Dale_, Feb 17 2013