; powers of 3
(define (power-of? m n)
(if (zero? (modulo n m))
(power-of? m (/ n m))
(= n 1)))
(display (power-of? 3 27)) (newline)
(display (power-of? 3 36)) (newline)
OyBwb3dlcnMgb2YgMwoKKGRlZmluZSAocG93ZXItb2Y/IG0gbikKICAoaWYgKHplcm8/IChtb2R1bG8gbiBtKSkKICAgICAgKHBvd2VyLW9mPyBtICgvIG4gbSkpCiAgICAgICg9IG4gMSkpKQoKKGRpc3BsYXkgKHBvd2VyLW9mPyAzIDI3KSkgKG5ld2xpbmUpCihkaXNwbGF5IChwb3dlci1vZj8gMyAzNikpIChuZXdsaW5lKQ==