40n=23n×5n. We need the highest power of 40 dividing 60!.
Power of 5 in 60!=⌊60/5⌋+⌊60/25⌋=12+2=14.
Power of 2 in 60!=⌊60/2⌋+⌊60/4⌋+⌊60/8⌋+⌊60/16⌋+⌊60/32⌋=30+15+7+3+1=56.
We need n≤14 and 3n≤56 (i.e., n≤18).
The binding constraint is n≤14, so the largest value is n=14.