nkpstn said:
It seems that there exists no integer k such that 2^k+1 is divisible by a positive integer n, if and only if n is of the form u(8x-1) (where u and x are also both positive integers).
Your wording strikes me as a little odd (the "and only if" bit), so to make sure we're on the same page I'll paraphrase it:
If n is a factor of 2^k+1 then n is not congruent to 7 mod 8.
I believe this is a special case of a much more general circumstance that appears to be true:
If (x,y)=1 [i.e. x and y are coprime] then
a) No factor of x^{2}+y^{2} is congruent to 3 or 7 mod 8
b) No factor of 2x^{2}+y^{2} is congruent to 5 or 7 mod 8
(Your conjecture follows from (a) for k even and (b) for k odd.)
I'll sketch a proof of (a):
x^{2}+y^{2} can be factorised as x+iy, x-iy.
Since x and y coprime, neither of these complex factors has any real factors greater than 1.
If n is a real factor of x^{2}+y^{2}, it must be factorisable into complex factors of x+iy, x-iy.
If these are a+ib, c+id respectively, ad + bc = 0.
Since (x,y)=1, (a,b)=1 and (c,d)=1.
So every real factor of a is also a real factor of c and vice versa.
Hence a = +/-c, and b = +/-d.
Thus, w.l.o.g., a = c, d = -b.
So n = a^{2}+b^{2}. Since each square is individually 0, 1 or 4 modulo 8, the sum must be 0, 1, 2, 4 or 5 modulo 8.