Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2 added 48 characters in body
source | link

Mathematica (Wolfram language), 3232 31 bytes

1 byte saved thanks to J42161217!

OddQ@Log[2,#+Floor@Sqrt[#OddQ@Log2[#+Floor@Sqrt[#/2]+2]&

Try it online!

Pure function taking an integer as input and returning True or False. Based on the fact (fun to prove!) that a number n is Cyclops if and only if n plus the square root of n/2 plus 2 rounds down to an odd power of 2. (One can replace Floor by either Ceiling or Round as long as one also replaces +2 by +1.) Returns True on input 0.

Mathematica (Wolfram language), 32 bytes

OddQ@Log[2,#+Floor@Sqrt[#/2]+2]&

Try it online!

Pure function taking an integer as input and returning True or False. Based on the fact (fun to prove!) that a number n is Cyclops if and only if n plus the square root of n/2 plus 2 rounds down to an odd power of 2. (One can replace Floor by either Ceiling or Round as long as one also replaces +2 by +1.) Returns True on input 0.

Mathematica (Wolfram language), 32 31 bytes

1 byte saved thanks to J42161217!

OddQ@Log2[#+Floor@Sqrt[#/2]+2]&

Try it online!

Pure function taking an integer as input and returning True or False. Based on the fact (fun to prove!) that a number n is Cyclops if and only if n plus the square root of n/2 plus 2 rounds down to an odd power of 2. (One can replace Floor by either Ceiling or Round as long as one also replaces +2 by +1.) Returns True on input 0.

1
source | link

Mathematica (Wolfram language), 32 bytes

OddQ@Log[2,#+Floor@Sqrt[#/2]+2]&

Try it online!

Pure function taking an integer as input and returning True or False. Based on the fact (fun to prove!) that a number n is Cyclops if and only if n plus the square root of n/2 plus 2 rounds down to an odd power of 2. (One can replace Floor by either Ceiling or Round as long as one also replaces +2 by +1.) Returns True on input 0.