Section 17. For the purposes of this chapter, chapter one hundred and eleven and chapter two hundred and thirty-nine, occupancy of a dwelling unit within premises licensed as a rooming house or lodging house, except for fraternities, sororities and dormitories of educational institutions, for three consecutive months shall constitute a tenancy at will; provided, however, that if the rent for occupancy in such premises is payable either daily or weekly, seven days written notice to the occupant shall be sufficient to terminate the tenancy where the tenant is committing or permitting to exist a nuisance in or is causing substantial damage to the rental unit, or is creating substantial damage to the rental unit, or is creating a substantial interference with the comfort, safety, or enjoyment of the landlord or other occupants of the accommodation; and provided, further, that the notice shall specify the nuisance or interference. Occupancy of a dwelling unit within a rooming house or lodging house, except for fraternities, sororities and dormitories of educational institutions, for more than thirty consecutive days and less than three consecutive months, or within a fraternity, sorority or dormitory of an educational institution for any length of time, may only be terminated by seven days' notice in writing to the occupant by the operator of such dwelling unit.