login
A160961
Primes of the form p + q + r with p, q and r also prime such that p^2 + 1 = q^2 + r^2.
1
17, 31, 41, 71, 89, 97, 109, 113, 127, 197, 239, 251, 349, 379, 433, 461, 631, 829, 881, 911, 919, 953, 967, 991, 1151, 1231, 1427, 1429, 1471, 1693, 1759, 1847, 1871, 2143, 2269, 2273, 2393, 2399, 2437, 2531, 2591, 2617, 2633, 2647, 2729, 2851, 2953, 2969
OFFSET
1,1
LINKS
EXAMPLE
Primes p=13, q=7, and r=11 give 13^2 + 1 = 7^2 + 11^2 = 170, so 13 + 7 + 11 = 31 (prime) is a term.
Primes p=17, q=11, and r=13 give 17^2 + 1 = 11^2 + 13^2 = 290, so 17 + 11 + 13 = 41 (prime) is a term.
Primes p=23, q=13, and r=19 give 23^2 + 1 = 13^2 + 19^2 = 530, but 23 + 13 + 19 = 55 (composite), so 55 is not a term.
Primes p=31, q=11, and r=29 give 31^2 + 1 = 11^2 + 29^2 = 962, so 31 + 11 + 29 = 71 (prime) is a term.
MAPLE
A := {}: for i to 250 do for j to 250 do for k to 250 do x := ithprime(i): y := ithprime(j): z := ithprime(k): if `and`(isprime(x+y+z) = true, x^2+1 = y^2+z^2) then A := `union`(A, {x+y+z}) else end if end do end do end do: A; # Emeric Deutsch, Jun 21 2009
# Alternative: yields the pairs [x+y+z, [x, y, z]]
B := {}: for i to 20 do for j to 20 do for k to 20 do x := ithprime(i): y := ithprime(j): z := ithprime(k): if `and`(isprime(x+y+z) = true, x^2+1 = y^2+z^2) then B := `union`(B, {[x+y+z, [x, y, z]]}) else end if end do end do end do: B; # Emeric Deutsch, Jun 21 2009
PROG
(PARI) upto(lim)={my(L=List()); forprime(p=1, lim, forprime(r=1, p, my(q); if(issquare(p^2+1-r^2, &q) && isprime(q) && r <= q, my(s=p+q+r); if(isprime(s) && s<=lim, listput(L, s))))); Set(L)} \\ Andrew Howroyd, Nov 28 2025
CROSSREFS
Cf. A000040.
Sequence in context: A134076 A258029 A321596 * A260805 A267781 A393317
KEYWORD
nonn
AUTHOR
Vladislav-Stepan Malakhovsky and Juri-Stepan Gerasimov, May 31 2009
EXTENSIONS
Corrected and extended by Emeric Deutsch, Jun 21 2009
Edited by Jon E. Schoenfield, Feb 23 2019
STATUS
approved