#Perl, 2321 bytes
say/^(?!(..+)\1+$)/
using -n
option
Using the regular expression+unary input approach, prints 11
(or whatever your digit entered) or a blank line
Bonus: decimal version, 32 bytes
(1x<>)=~/^1?$|^(11+)\1+$/||say 1
#Perl, 2321 bytes
say/^(?!(..+)\1+$)/
using -n
option
Using the regular expression+unary input approach, prints 11
(or whatever your digit entered) or a blank line
Bonus: decimal version, 32 bytes
(1x<>)=~/^1?$|^(11+)\1+$/||say 1