What's my lucky factor?
Python 2, 72 bytes
Takes a positive integer \$ x \$ and outputs the lucky factor of \$ x \$. Outputs via exit code.

x=input()
R=range(1,x+1)
for i in R:i+=i&lt;2;del R[i-1::i];x&gt;R[-1]&lt;exit(i)

Try it online!