Skip to main content
4 of 6
-2 bytes
ThaddeusB
  • 401
  • 2
  • 8

#Perl, 2321 bytes

say/^(?!(..+)\1+$)/

using -n option

say=~/^(?!(..+)\1+$)/

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
ThaddeusB
  • 401
  • 2
  • 8