Four versions of the puzzle
4 weighings: 39 coins
The formula (3ⁿ − 3)/2 triples with each weighing: 3, 12, 39, 120 coins. Two changes to the rules add one coin each. With a genuine reference coin, the bound is (3ⁿ − 1)/2. If you only need to find the coin and do not care whether it is lighter or heavier, it is also (3ⁿ − 1)/2: one coin may never touch the scale, and if everything balanced, it is that one.
Both changes together give (3ⁿ + 1)/2, which is 14 coins in 3 weighings. The page checks all these numbers by searching every strategy for 1 to 3 weighings; for 4 weighings (39, 40, 40 and 41) we ran the same search separately. A curiosity: two coins without a reference can never be sorted out, because after 1 : 2 you do not know which one is to blame.