OFFSET
1,3
PROG
(PARI) A354201(n) = if(n<=3, (n+1)\2, my(m=prime(n)%4); forstep(i=n-1, 0, -1, if(m==(prime(i)%4), return(prime(i)))));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 23 2022
STATUS
approved