login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A259232 Smallest prime q > p such that q + p is a square, where p is the n-th prime. 3
7, 13, 11, 29, 53, 23, 19, 557, 41, 71, 113, 107, 59, 101, 53, 271, 137, 83, 257, 73, 251, 821, 113, 107, 227, 223, 797, 149, 467, 211, 197, 193, 263, 761, 251, 173, 167, 1601, 233, 227, 397, 719, 293, 383, 379, 701, 1553, 353, 257, 347, 251, 337, 659, 773, 419, 313, 307, 1493, 1019, 503, 293 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Corresponding squares a(n)+prime(n): 9,16,16,36,64,36,36,576,64,100.

Also, a(n) >= A157480(n).

LINKS

Zak Seidov, Table of n, a(n) for n = 1..10000

MATHEMATICA

Table[p=Prime[n]; x=1+Floor[Sqrt[2*p]]; While[!PrimeQ[q=x^2-p], x++]; q, {n, 100}]

PROG

(PARI) a(n)=p = prime(n); k = nextprime(p+1); while(!issquare(p+k), k = nextprime(k+1)); k; \\ Michel Marcus, Jun 22 2015

(PARI) a(n, p=prime(n))=my(s=sqrtint(2*p)); while(!isprime(s++^2-p), ); s^2-p \\ Charles R Greathouse IV, May 06 2016

CROSSREFS

Cf. A000040, A157480.

Sequence in context: A066003 A115858 A114389 * A329017 A243389 A242584

Adjacent sequences:  A259229 A259230 A259231 * A259233 A259234 A259235

KEYWORD

nonn

AUTHOR

Zak Seidov, Jun 22 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 17 07:35 EDT 2021. Contains 347478 sequences. (Running on oeis4.)