(dontWorry(20))
# $isHappy
#[1] FALSE
#$theseq
#[1] "20" "4" "16" "37" "58" "89" "145" "42" "20"
#$cyclic
#[1] TRUE
(dontWorry('2254', base = 6))
# $isHappy
# [1] TRUE
#
# $theseq
# [1] "2254" "121" "10" "1"
#
# $cyclic
# [1] FALSE
Run the code above in your browser using DataLab