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!)
A227340 Primes of the form p^2 + q^2 - 1 where p and q are consecutive primes. 3
73, 457, 1801, 3049, 3529, 4057, 8209, 10369, 19609, 20809, 33289, 41521, 51217, 84121, 103969, 111409, 115201, 121081, 129049, 141529, 150169, 155689, 180097, 223129, 282769, 308929, 342841, 397849, 426889, 432457, 627217, 649801, 658969, 710449, 729649 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000

EXAMPLE

a(1) = 5^2 + 7^2 - 1 = 73, which is prime.

MAPLE

K := proc(x) local a; a:=ithprime(x)^2+ithprime(x+1)^2-1; if (isprime(a))then RETURN (a) fi: end: seq(K(x), x=1..500); # K. D. Bajpai, Jul 07 2013

K:=proc()local x, a, c; c:=1; for x from 1 to 5000 do; a:=ithprime(x)^2+ithprime(x+1)^2-1; if isprime(a) then lprint(c, a); c:=c+1; fi; od; end: K(); # K. D. Bajpai, Jul 07 2013

MATHEMATICA

t = {}; Do[p = Prime[n]; q = Prime[n + 1]; p2 = p^2 + q^2 - 1; If[PrimeQ[p2], AppendTo[t, p2]], {n, 200}]; t (* T. D. Noe, Jul 09 2013 *)

PROG

(PARI) is(n)=if(isprime(n), my(x=sqrtint((n+1)\2)); nextprime(x+1)^2 +precprime(x)^2==n+1 && n>3, 0) \\ Charles R Greathouse IV, Jul 08 2013

(PARI) p=2; forprime(q=3, 1e5, if(isprime(t=p^2+q^2-1), print1(t", ")); p=q) \\ Charles R Greathouse IV, Jul 08 2013

CROSSREFS

Cf. A072669.

Sequence in context: A299103 A201961 A142145 * A043427 A038485 A077722

Adjacent sequences:  A227337 A227338 A227339 * A227341 A227342 A227343

KEYWORD

nonn

AUTHOR

K. D. Bajpai, Jul 07 2013

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 May 25 22:51 EDT 2022. Contains 354073 sequences. (Running on oeis4.)