What is the average of all positive integers that have four digits when written in base 3, but two digits when written in base 5? Write your answer in base 10.

The average is 17/3.