Vyxal, 87 bytes
›3•u~Ḋß_›3•D⌊=*
-1 thanks to Steffan.
A different approach that's annoyingly longer. Getting the I/O format right was annoying.
› # Increment
3• # Log 3
u # Push -1
~Ḋ D⌊= # Check divisibility without popping
ß_ # If so, pop the -1 andif printit's thean numberinteger
* # Otherwise, the -1Multiply isby printed.that