%I #39 Oct 28 2016 08:56:40
%S 2,5,23,29,47,53,71,101,149,167,173,191,197,239,263,269,293,311,317,
%T 359,383,389,431,461,479,503,509,557,599,647,653,677,701,719,743,773,
%U 797,821,839,863,887,911,941,983,1013,1031,1061,1103,1109,1151,1181,1223,1229,1277,1301,1319,1367
%N Primes of the form -x^2+4*x*y+2*y^2 (as well as of the form 5*x^2+8*x*y+2*y^2).
%C Discriminant is 24. Class is 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.
%C Also primes of form 6*u^2 - v^2. The transformation {u, v} = {y, x - 2*y} yields the form in the title. - _Juan Arias-de-Reyna_, Mar 19 2011
%C Members of A141171 but not of A105880: 2, 431, 911, 1013, 1181, ..., . - _Robert G. Wilson v_, Aug 30 2013
%C This is also the list of primes p such that p = 2 or p is congruent to 5 or 23 mod 24 - _Jean-François Alcover_, Oct 28 2016
%D Z. I. Borevich and I. R. Shafarevich, Number Theory.
%D D. B. Zagier, Zetafunktionen und quadratische Körper.
%H Juan Arias-de-Reyna, <a href="/A141171/b141171.txt">Table of n, a(n) for n = 1..10000</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)
%e a(4) = 29 because we can write 29 = -1^2 + 4*1*3 + 2*3^2 (or 29 = 5*1^2 + 8*1*2 + 2*2^2).
%p N:= 10^5: # to get all terms <= N
%p select(t -> isprime(t) and [isolve(6*u^2-v^2=t)]<>[], [2, seq(op([24*i+5,24*i+23]),i=0..floor((N-5)/24))]); # _Robert Israel_, Sep 28 2014
%t A141171 = {}; Do[p = -x^2 + 4 * x * y + 2 * y^2; If[p > 0 && PrimeQ@ p, AppendTo[A141171, p]], {x, 25}, {y, 25}]; Take[ Union@ A141171, 57] (* _Robert G. Wilson v_, Aug 30 2013 *)
%t Select[Prime[Range[250]], # == 2 || MatchQ[Mod[#, 24], 5|23]&] (* _Jean-François Alcover_, Oct 28 2016 *)
%Y Cf. A141170 (d = 24), A105880 (Primes for which -8 is a primitive root.) A038872 (d = 5). A038873 (d = 8). A068228, A141123 (d = 12). A038883 (d = 13). A038889 (d = 17). A141111, A141112 (d = 65).
%Y Cf. also A242665.
%Y For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.
%K nonn
%O 1,1
%A Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (oscfalgan(AT)yahoo.es), Jun 12 2008
|