Skip to main content
1 of 3
LegionMammal978
  • 18k
  • 4
  • 25
  • 57

Mathematica, 62 bytes

MatchQ[Differences@IntegerDigits@#,{a:1...,b:___}/;{b}==-{a}]&

Anonymous function. Takes a number as input and returns True or False as output.

LegionMammal978
  • 18k
  • 4
  • 25
  • 57