If you're listing factors, you should also list 1 and n, to be complete edit: also, shouldn't the 1280 one be returning 640 too?