OFFSET
1,1
COMMENTS
Discriminant = 40. Class = 2. Binary quadratic forms a*x^2 + b*x*y + c*y^2 have discriminant d = b^2 - 4ac.
For each term p > 5, p^2 == 13^2 (mod 240), and p is of the form 120*k +- b, where b = (13, 37, 43, 53). - Boyd Blundell, Jul 05 2021
REFERENCES
Z. I. Borevich and I. R. Shafarevich, Number Theory.
LINKS
Juan Arias-de-Reyna, Table of n, a(n) for n = 1..10000
Peter Luschny, Binary Quadratic Forms
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS: Index to related sequences, programs, references. OEIS wiki, June 2014.
D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.
EXAMPLE
13 is a term because we can write 13 = 3*2^2 + 2*2*1 - 3*1^2 (or 13 = 3*1^2 + 8*1*1 + 2*1^2).
MATHEMATICA
Select[Prime[Range[250]], # == 2 || # == 5 || MatchQ[Mod[#, 40], Alternatives[3, 13, 27, 37]]&] (* Jean-François Alcover, Oct 28 2016 *)
PROG
(Sage) # uses[binaryQF]
# The function binaryQF is defined in the link 'Binary Quadratic Forms'.
Q = binaryQF([3, 2, -3])
print(Q.represented_positives(1277, 'prime')) # Peter Luschny, Aug 12 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
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
STATUS
approved