A nice number is an integer ending in 3 or 7 when written out in decimal. Prove that every nice number has a prime factor that is also a nice numbers. My teacher just asked me a question like this but i do not know how to start and work it out at all. Can someone help me out with that?

Lets try elimination :
Numbers ending by 3 or 7 are odd.So they must consists of factors ending by {1, 3, 5, 7, 9}.(excluding even numbers)
Numbers having 5 as their factor will lead to numbers ending with 0 and 5 only.
Hence the number must have factors ending with {1, 3, 7, 9}
Numbers ending with 1 might or might not be there in the factors list as multiplying 1 will result in the same number.Hence {3, 7, 9}.
Numbers ending with 9 alone cannot be there as the prime factors because 9 * 3 = 27 and 9 * 7 = 63 i.e 9 needs numbers ending with either 3 or 7 with it to satisfy the definition of nice number.
Hence for the factors of a nice number ,numbers ending with either of {3, 7} are a must.
