login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118590 Larger of two consecutive primes whose positive difference is a square. 3
3, 11, 17, 23, 41, 47, 71, 83, 101, 107, 113, 131, 167, 197, 227, 233, 281, 311, 317, 353, 383, 401, 443, 461, 467, 491, 503, 617, 647, 677, 743, 761, 773, 827, 857, 863, 881, 887, 911, 941, 971, 1013, 1091, 1097, 1217, 1283, 1301, 1307, 1427, 1433, 1451, 1487 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Superset of A031935 and A031505. [From R. J. Mathar, Aug 08 2008]

LINKS

T. D. Noe, Table of n, a(n) for n = 1..1000

EXAMPLE

7 and 11 are consecutive primes. 11-7 = 4 a square, so 11 is the second term in the table.

MATHEMATICA

Select[Table[Prime[n], {n, 2, 237}], IntegerQ[Sqrt[# - Prime[PrimePi[# - 1]]]] &] (* Jayanta Basu, Apr 23 2013 *)

nn = 500; ps = Prime[Range[nn]]; t = {}; Do[If[IntegerQ[Sqrt[ps[[n]] - ps[[n-1]]]], AppendTo[t, ps[[n]]]], {n, 2, nn}]; t (* T. D. Noe, Apr 23 2013 *)

Prime[#+1]&/@Flatten[Position[Differences[Prime[Range[250]]], _?(IntegerQ[ Sqrt[#]]&)]] (* Harvey P. Dale, May 08 2019 *)

PROG

(PARI) g(n) = for(x=2, n, if(issquare(prime(x)-prime(x-1)), print1(prime(x)", ")))

CROSSREFS

Sequence in context: A108328 A153419 A079020 * A136082 A106083 A113803

Adjacent sequences:  A118587 A118588 A118589 * A118591 A118592 A118593

KEYWORD

easy,nonn

AUTHOR

Cino Hilliard, May 07 2006

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 December 6 04:43 EST 2019. Contains 329784 sequences. (Running on oeis4.)