A141160 Primes of the form -x^2 + 3*x*y + 3*y^2 (as well as of the form 5*x^2 + 9*x*y + 3*y^2).
3, 5, 17, 41, 47, 59, 83, 89, 101, 131, 167, 173, 227, 251, 257, 269, 293, 311, 353, 383, 419, 461, 467, 479, 503, 509, 521, 563, 587, 593, 647, 677, 719, 761, 773, 797, 839, 857, 881, 887, 929, 941, 971, 983, 1013, 1049, 1091, 1097, 1109, 1151, 1181, 1193
Offset: 1
Keywords
Examples
a(3)=17 because we can write 17 = -1^2 + 3*1*2 + 3*2^2 (or 17 = 5*1^2 + 9*1*1 + 3*1^2).
References
- Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966.
- D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.
Links
- Peter Luschny, Binary Quadratic Forms
- N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
Crossrefs
Programs
-
Magma
[3] cat [p: p in PrimesUpTo(2000) | p mod 21 in [5, 17, 20]]; // Vincenzo Librandi, Jul 11 2018
-
Mathematica
Reap[For[p = 2, p < 2000, p = NextPrime[p], If[FindInstance[p == -x^2 + 3*x*y + 3*y^2, {x, y}, Integers, 1] =!= {}, Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Oct 25 2016 *) Join[{3}, Select[Prime[Range[250]], MemberQ[{5, 17, 20}, Mod[#, 21]] &]] (* Vincenzo Librandi, Jul 11 2018 *)
-
Sage
# uses[binaryQF] # The function binaryQF is defined in the link 'Binary Quadratic Forms'. Q = binaryQF([-1, 3, 3]) Q.represented_positives(1200, 'prime') # Peter Luschny, Jun 24 2019
Extensions
More terms from Colin Barker, Apr 05 2015
Comments