Modulated linear dynamics of nanobeams accounting for higher gradient effects