> if(n < 0)
Perhaps you should do this before calling Primality(n), not after.

> That's really hard to read, you must not have copy-pasted as plain text.
Unfortunately, any attempt to...