# Difference between a square and a power of 2

How many positive integers $$n\leq 10000$$ are there such that $$7 | 2^n - n^2$$ ?

Note: '$$|$$' means 'divides'.

×