This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A141160 #53 Sep 08 2022 08:45:35 %S A141160 3,5,17,41,47,59,83,89,101,131,167,173,227,251,257,269,293,311,353, %T A141160 383,419,461,467,479,503,509,521,563,587,593,647,677,719,761,773,797, %U A141160 839,857,881,887,929,941,971,983,1013,1049,1091,1097,1109,1151,1181,1193 %N 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). %C A141160 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 A141160 Except a(1) = 3, primes congruent to {5, 17, 20} mod 21. - _Vincenzo Librandi_, Jul 11 2018 %C A141160 The comment above is true since the binary quadratic forms with discriminant 21 are in two classes as well as two genera, so there is one class in each genus. A141159 is in the other genus, with primes = 7 or congruent to {1, 4, 16} mod 21. - _Jianing Song_, Jul 12 2018 %C A141160 4*a(n) can be written in the form 21*w^2 - z^2. - _Bruno Berselli_, Jul 13 2018 %C A141160 Both forms [-1, 3, 3] (reduced) and [5, 9, 3] (not reduced) are properly (via a determinant +1 matrix) equivalent to the reduced form [3, 3, -1], a member of the 2-cycle [[3, 3, -1], [-1, 3, 3]]. The other reduced form is the principal form [1, 3, -3], with 2-cycle [[1, 3, -3], [-3, 3, 1]] (see, e.g., A141159, A139492). - _Wolfdieter Lang_, Jun 24 2019 %D A141160 Z. I. Borevich and I. R. Shafarevich, Number Theory. Academic Press, NY, 1966. %D A141160 D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981. %H A141160 Peter Luschny, <a href="https://oeis.org/wiki/User:Peter_Luschny/BinaryQuadraticForms#Implementation">Binary Quadratic Forms</a> %H A141160 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 A141160 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). %t A141160 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 *) %t A141160 Join[{3}, Select[Prime[Range[250]], MemberQ[{5, 17, 20}, Mod[#, 21]] &]] (* _Vincenzo Librandi_, Jul 11 2018 *) %o A141160 (Magma) [3] cat [p: p in PrimesUpTo(2000) | p mod 21 in [5, 17, 20]]; // _Vincenzo Librandi_, Jul 11 2018 %o A141160 (Sage) # uses[binaryQF] %o A141160 # The function binaryQF is defined in the link 'Binary Quadratic Forms'. %o A141160 Q = binaryQF([-1, 3, 3]) %o A141160 Q.represented_positives(1200, 'prime') # _Peter Luschny_, Jun 24 2019 %Y A141160 Cf. A141159, A139492 (d=21) A038872 (d=5). A038873 (d=8). A068228, A141123 (d=12). A038883 (d=13). A038889 (d=17): A141111, A141112 (d=65). %Y A141160 Primes in A237351. %Y A141160 For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link. %K A141160 nonn %O A141160 1,1 %A A141160 Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (marcanmar(AT)alum.us.es), Jun 12 2008 %E A141160 More terms from _Colin Barker_, Apr 05 2015