Hilbert cubes in arithmetic sets