OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
sqrt(11) = 3.3166247..., which when rounded is 3, and both 3 and 11 are prime, so 11 is in the sequence.
MAPLE
R:= NULL: count:= 0:
q:=1:
while count < 100 do
q:= nextprime(q);
p:= floor((q-1/2)^2);
u:= (q+1/2)^2;
while count < 100 do
p:= nextprime(p);
if p > u then break fi;
R:= R, p; count:= count+1;
od
od:
R; # Robert Israel, Mar 29 2023
MATHEMATICA
Select[Prime[Range[500]], PrimeQ[Round[Sqrt[#]]] &]
PROG
(Python)
from itertools import islice
from math import isqrt
from sympy import isprime, nextprime
def A360567_gen(): # generator of terms
p = 1
while p:=nextprime(p):
if isprime((m:=isqrt(p))+int(p-m*(m+1)>=1)):
yield p
CROSSREFS
KEYWORD
nonn
AUTHOR
Rhys Feltman, Feb 11 2023
STATUS
approved