login
A133204
Primes p such that the non-Pellian equation x^2-2py^2=-1 is solvable.
3
5, 13, 29, 37, 41, 53, 61, 101, 109, 113, 137, 149, 157, 173, 181, 197, 229, 269, 277, 293, 313, 317, 349, 373, 389, 397, 409, 421, 457, 461, 509, 521, 541, 557, 569, 613, 653, 661, 677, 701, 709, 733, 757, 761, 773, 797, 809, 821, 829, 853, 857, 877, 941
OFFSET
1,1
COMMENTS
The sequence contains no primes congruent to 3 modulo 4 and all primes congruent to 5 modulo 8.
Different from A385224, primes p such that multiplicative order of -4 modulo p is odd: 593 is in A385224 (ord(-4,593) = 37), but it is not here (x^2 - 1186*y^2 = -1 has no solution); 1601 is not in A385224 (ord(-4,1601) = 200), but it is here (x^2 - 3202*y^2 = -1 has solution (1641,29)). - Jianing Song, Jun 22 2025
LINKS
H. von Lienen, The quadratic form x^2-2py^2, J. Number Theory 10 (1978), 10-15.
MAPLE
select(p -> isprime(p) and [isolve(x^2 - 2*p*y^2 = -1)] <> [], [2, seq(p, p=3..1000, 2)]); # Robert Israel, Dec 23 2025
MATHEMATICA
fQ[n_] := Solve[x^2 + 1 == 2 n*y^2, {x, y}, Integers] != {}; Select[ Prime@ Range@ 160, fQ] (* Robert G. Wilson v, Dec 19 2013 *)
PROG
(Python)
from itertools import count, islice
from sympy import nextprime
from sympy.solvers.diophantine.diophantine import diop_DN
def A133204_gen(startvalue=2): # generator of terms >= startvalue
p = max(2, nextprime(startvalue-1))
while True:
if len(diop_DN(p<<1, -1)):
yield p
p = nextprime(p)
A133204_list = list(islice(A133204_gen(), 50)) # Chai Wah Wu, Dec 22 2025
CROSSREFS
Subsequence of A002144 (primes congruent to 1 modulo 4).
Contains A007521 (primes congruent to 5 or modulo 8) as a proper subsequence.
Cf. A385224.
Sequence in context: A224339 A368546 A385224 * A207040 A309588 A268614
KEYWORD
nonn
AUTHOR
David Brink, Dec 29 2007
STATUS
approved