Post History
BQN, 13 bytesSBCS ∧´0≠⊢|˜·×˜2+↕ Run online! A train submission. It's 2 bytes shorter than the lambda version {∧´0≠𝕩|˜×˜2+↕𝕩}, due to omitting curly braces. The idea is similar to ruby: ran...
Answer
#1: Initial revision
# [BQN](https://mlochbaum.github.io/BQN/), 13 bytes<sup>[SBCS](https://github.com/mlochbaum/BQN/blob/master/commentary/sbcs.bqn)</sup> ```none ∧´0≠⊢|˜·×˜2+↕ ``` [Run online!](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAg4oinwrQw4omg4oqifMucwrfDl8ucMivihpUKCj7ii4jin5xGwqggMSvihpUxMA==) A train submission. It's 2 bytes shorter than the lambda version `{∧´0≠𝕩|˜×˜2+↕𝕩}`, due to omitting curly braces. The idea is similar to ruby: - range 2..n+1 - square it, then modulo n - are all remainders ≠ 0?