OFFSET
1,1
COMMENTS
Equivalently, by quadratic reciprocity (since 13 == 1 (mod 4)), primes p which are squares mod 13.
The squares mod 13 are 0, 1, 4, 9, 3, 12 and 10.
Also primes of the form x^2 + 3*x*y - y^2. Discriminant = 13. Class = 1. This was originally a separate entry, submitted by Laura Caballero Fernandez, Lourdes Calvo Moguer, Maria Josefa Cano Marquez, Oscar Jesus Falcon Ganfornina and Sergio Garrido Morales (oscfalgan(AT)yahoo.es), Jun 06 2008. R. J. Mathar proved that this coincides with the present sequence, Jul 22 2008
Primes p such that x^2 + x = 3 has a solution mod p (the solutions over the reals are (-1+-sqrt(13))/2). - Joerg Arndt, Jul 27 2011
REFERENCES
Z. I. Borevich and I. R. Shafarevich, Number Theory.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Peter Luschny, Binary Quadratic Forms
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.
FORMULA
EXAMPLE
13 == 1 (mod 3) and 1 is a square, so 3 is on the list.
101 is prime and congruent to 7^2 = 49 == 10 (mod 13), so 101 is on the list.
MATHEMATICA
Select[ Prime@ Range@ 118, JacobiSymbol[ #, 13] > -1 &] (* Robert G. Wilson v, May 16 2008 *)
Select[Flatten[Table[13n + {1, 3, 4, 9, 10, 12}, {n, 50}]], PrimeQ[#] &] (* Alonso del Arte, Sep 16 2012 *)
PROG
(PARI) forprime(p=3, 1e3, if(issquare(Mod(13, p)), print1(p", "))) \\ Charles R Greathouse IV, Jul 15 2011
(PARI) select( {is_A038883(n)=bittest(5659, n%13)&&isprime(n)}, [0..666]) \\ M. F. Hasler, Feb 17 2022
(Sage) # uses[binaryQF]
# The function binaryQF is defined in the link 'Binary Quadratic Forms'.
Q = binaryQF([1, 3, -1])
print(Q.represented_positives(641, 'prime')) # Peter Luschny, Sep 20 2018
CROSSREFS
Cf. A038872 (d=5). A038873 (d=8). A068228, A141123 (d=12). A038883 (primes p such that d=13 is a square mod p). A038889 (d=17). A141111, A141112 (d=65).
Cf. A296937.
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Apr 27 2008, Jul 28 2008
STATUS
approved