OFFSET
1,1
COMMENTS
Also, i^2+p(1), i^2+p(2),..., i^2+p(k), i^2+i+p(1), i^2+i+p(2),..., i^2+i+p(k), for i>=3, where p(n) is the n-th prime and p(k) is the largest prime strictly less than i.
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 1..10000
EXAMPLE
floor(sqrt(28)) = 5. 28 modulo 5 = 3, which is prime, so 28 is in the sequence.
MATHEMATICA
Select[Range[200], PrimeQ[ Mod[#, Floor[Sqrt[#]]]]&] (* Harvey P. Dale, May 31 2019 *)
PROG
(Python)
from sympy import isprime
from math import sqrt, floor
from itertools import count
sequence = (_ for _ in count(1) if isprime(_ % floor(sqrt(_))))
print([next(sequence) for i in range(50)])
(PARI) for(n=1, 10^3, if(isprime(n%sqrtint(n)), print1(n", "))) \\ Jens Kruse Andersen, Aug 16 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mark E. Shoulson, Aug 14 2014
EXTENSIONS
Added alternative formulation in comment.
STATUS
approved