Skip to main content
added 191 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Python 2, 39 bytes

f=lambda n,k=3:n%k^k/2>0<f(n,k+2)or k>n

Try it online!

Alternate versions

f=lambda n,k=3:n%k^1>0<f(n-1,k+2)or k>n
f=lambda n,k=3:~-n%k>0<f(n-1,k+2)or k>n
f=lambda n,k=3:n%k!=1==f(n-1,k+2)or k>n

Python 2, 39 bytes

f=lambda n,k=3:n%k^k/2>0<f(n,k+2)or k>n

Try it online!

Python 2, 39 bytes

f=lambda n,k=3:n%k^k/2>0<f(n,k+2)or k>n

Try it online!

Alternate versions

f=lambda n,k=3:n%k^1>0<f(n-1,k+2)or k>n
f=lambda n,k=3:~-n%k>0<f(n-1,k+2)or k>n
f=lambda n,k=3:n%k!=1==f(n-1,k+2)or k>n
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Python 2, 39 bytes

f=lambda n,k=3:n%k^k/2>0<f(n,k+2)or k>n

Try it online!