OFFSET
1,1
EXAMPLE
18 is in the sequence since floor(sqrt(18)) = 4, which does not divide 18, but it does divide 18^2 = 324.
MATHEMATICA
Flatten[Table[If[(1 - Ceiling[n^2/Floor[Sqrt[n]]] + Floor[n^2/Floor[Sqrt[n]]]) (Ceiling[n/Floor[Sqrt[n]]] - Floor[n/Floor[Sqrt[n]]]) == 1, n, {}], {n, 2000}]]
PROG
(PARI) isok(k) = (k % sqrtint(k)) && !(k^2 % sqrtint(k)); \\ Michel Marcus, Apr 24 2021
(Python)
from math import isqrt
def ok(k): r = isqrt(k); return k % r != 0 and k**2 % r == 0
print(list(filter(ok, range(1, 1351)))) # Michael S. Branicky, Apr 24 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Apr 24 2021
STATUS
approved