login
A391049
Primes p such that p^2 - 4*q*r = s^2, where q, r are primes and s > 0.
2
5, 7, 11, 13, 19, 23, 31, 43, 47, 59, 61, 73, 83, 103, 107, 109, 139, 151, 167, 179, 181, 193, 199, 227, 229, 241, 263, 271, 283, 313, 347, 349, 359, 383, 421, 433, 463, 467, 479, 503, 523, 563, 571, 587, 601, 619, 643, 661, 719, 811, 823, 829, 839, 859, 863, 883
OFFSET
1,1
COMMENTS
Primes p such that r*x^2 + p*x + q = 0 (equivalently, q*x^2 + A391049(n)*x + 2 = 0) has two rational roots for some primes q, r.
Necessarily q = 2 or r = 2. Proof: If p = 2, no primes q, r satisfy p^2 - 4*q*r = s^2. For p > 2, p^2 is odd, hence s^2 is odd, say s = 2*k - 1. Write p = 4*m +- 1. Then 4*q*r = p^2 - s^2 = (4m +- 1)^2 - (2*k - 1)^2 = 8*(2m^2 + (2 +- 1)*m - k*(k + 1)/2). Since k*(k + 1)/2 is an integer, 4*q*r is divisible by 8, so q*r is even, forcing q = 2 or r = 2.
For p > 7 exists at most one unordered pair {q, r}. Proof: For odd p, one of q, r equals 2. Without loss of generality set r = 2. Then (p - s)(p + s) = 8*q with p, s odd, so write p - s = 2*u, p + s = 2*v. Then 4*u*v = 8*q => u*v = 2*q and gcd(u, v) = 1 (since gcd(p - s, p + s) = 2). Hence {u, v} is {1, 2q} or {2, q}. Thus, p - s = 2, p + s = 4*q => q = (p - 1)/2 or p - s = 4, p + s = 2*q => q = p - 2. For p > 7, at most one of (p - 1)/2 and p - 2 is prime: if p == 1 (mod 4), (p - 1)/2 is even > 2; if p == 3 (mod 4), modulo 3 forces one of (p - 1)/2 or p - 2 to be divisible by 3. Hence for p > 7 there is at most one unordered pair. For p = 5: {2, 2}, {2, 3}. For p = 7: {2, 3}, {2, 5}.
FORMULA
A prime p is a term if p - 2 or (p - 1)/2 is prime.
EXAMPLE
a(5) = 19 because 19^2 - 4*2*17 = 15^2.
a(6) = 23 because 23^2 - 4*2*11 = 21^2.
MAPLE
A391049 := proc(n) local i, p; option remember; if n = 1 then 5; else for i from NumberTheory:-pi(A391049(n - 1)) + 1 do p := ithprime(i); if isprime(p - 2) or isprime(1/2*p - 1/2) then return p; end if; end do; end if; end proc: seq(A391049(n), n = 1 .. 56);
KEYWORD
nonn,easy
AUTHOR
Felix Huber, Nov 26 2025
STATUS
approved