Create a program that accepts a positive integer and checks if it can be written in the form of (3^x)-1, where X is another positive integer.
If it can, output X
If it can't, output -1 or a falsy statement.
It can be written as (3^1) - 1, so we output x which is 1
26 can be written as (3^3) - 1, so we output x (3)
1024 can't be written in the form of (3^x) - 1, so we output -1
This is code-golf so least amount of bytes wins
Related OEIS: A024023