login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A255581 Numbers prime(n) such that prime(n)^2 + prime(n+1)^2 - prime(n+2)^2 is prime. 5
13, 23, 29, 37, 41, 43, 59, 61, 67, 71, 79, 89, 97, 103, 109, 137, 149, 173, 193, 197, 223, 227, 239, 269, 271, 307, 311, 313, 349, 353, 383, 409, 463, 467, 479, 487, 491, 521, 541, 547, 571, 577, 607, 613, 617, 619, 653, 659, 661, 691, 809, 821, 823, 857 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
13 belongs to the sequence as 13 is prime, 13 is the 6th prime number, the 7th prime is 17, the 8th prime is 19, and 13^2 + 17^2 - 19^2 = 97, which is prime.
31 does not belong to the sequence as 31^2 + 37^2 - 41^2 = 649 and 649 is not prime.
MAPLE
A255581:=n->`if`(isprime(ithprime(n)^2+ithprime(n+1)^2-ithprime(n+2)^2), ithprime(n), NULL): seq(A255581(n), n=1..200); # Wesley Ivan Hurt, Feb 28 2015
PROG
(Octave) p=primes(500); for i=1:100 ris=(p(i))^2+(p(i+1))^2-(p(i+2))^2; if ris>0 if isprime(ris) disp(p(i)); end end end
(PARI) lista(nn) = {forprime(p=2, nn, q = nextprime(p+1); r = nextprime(q+1); if (isprime(p^2+q^2-r^2), print1(p, ", ")); ); } \\ Michel Marcus, Mar 01 2015
CROSSREFS
Sequence in context: A347344 A102498 A019399 * A061967 A249350 A159082
KEYWORD
nonn
AUTHOR
Pierandrea Formusa, Feb 26 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)