1 of 3
Erik the Outgolfer
  • 39.5k
  • 5
  • 36
  • 119

Jelly, 8 bytes

BṚ¬;1T2ị

Try it online!

Uses 1-indexing, gets unsigned integer as input.

Erik the Outgolfer
  • 39.5k
  • 5
  • 36
  • 119