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!)
A130761 Primes prime(n) such that at least one of the two numbers (prime(n+2)^2-prime(n)^2)/2 - 1 and (prime(n+2)^2-prime(n)^2)/2 + 1 is prime. 8
3, 5, 7, 11, 13, 19, 29, 31, 37, 41, 43, 53, 59, 61, 67, 71, 79, 83, 97, 107, 127, 139, 149, 157, 179, 181, 191, 197, 227, 229, 239, 251, 263, 283, 293, 307, 347, 349, 353, 373, 419, 439, 443, 463, 467, 479, 499, 523, 541, 569, 601, 607, 613, 617, 619 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

(7^2 - 3^2)/2 - 1 is 19. Therefore 3 is in the sequence.

(19^2 - 13^2)/2 + 1 is 97. Hence 13 is in the sequence.

MAPLE

Res:= NULL:

p:= 5: q:= 3:

count:= 0:

while count < 100 do

  r:= q; q:= p; p:= nextprime(p);

  v:= (p^2-r^2)/2;

  if isprime(v+1) or isprime(v-1) then

    count:= count+1; Res:= Res, r;

  fi

od:

Res; # Robert Israel, Oct 03 2018

MATHEMATICA

Prime[Select[Range[140], PrimeQ[(Prime[ #+2]^2-Prime[ # ]^2)/2+1] || PrimeQ[(Prime[ # +2]^2-Prime[ # ]^2)/2-1] &]]

Select[Partition[Prime[Range[200]], 3, 1], AnyTrue[(#[[3]]^2-#[[1]]^2)/2+{1, -1}, PrimeQ]&][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 28 2020 *)

CROSSREFS

Sequence in context: A020575 A055072 A059334 * A154966 A072667 A092729

Adjacent sequences:  A130758 A130759 A130760 * A130762 A130763 A130764

KEYWORD

nonn,less

AUTHOR

J. M. Bergot, Jul 13 2007

EXTENSIONS

Edited and extended by Stefan Steinerberger, Jul 23 2007

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 September 26 14:21 EDT 2022. Contains 356999 sequences. (Running on oeis4.)