few number theory functions