Prime and composite numbers as integer parts of powers