|
|
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
|
|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|