The period of a simple pendulum is given by

where
L is the pendulum length
g is the acceleration of gravity
If we move the same pendulum from Earth to the Moon, its length L remains the same, while the acceleration of gravity g changes. So we can write the period of the pendulum on Earth as:

where

is the acceleration of gravity on Earth, while the period of the pendulum on the Moon is

where

is the acceleration of gravity on the Moon.
If we do the ratio of the two periods, we get

but the gravity acceleration on the Moon is 1/6 of the gravity acceleration on Earth, so we can write

and we can rewrite the previous ratio as

so the period of the pendulum on the Moon is
