login
A200512
Least m>0 such that n = y^2 - 2^x (mod m) has no solution, or 0 if no such m exists.
9
0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 15, 16, 0, 24, 0, 0, 0, 0, 12, 24, 0, 0, 16, 0, 0, 15, 16, 16, 0, 40, 12, 20, 0, 0, 0, 0, 0, 24, 16, 28, 15, 0, 12, 16, 64, 0, 20, 0, 0, 0, 20, 20, 39, 40, 12, 15, 0, 0, 16, 16, 0, 24, 0, 0, 0, 0, 12, 24, 0, 40, 15, 20, 112, 0
OFFSET
0,7
COMMENTS
To prove that an integer n is in A051204, it is sufficient to find (x,y) such that y^2 - 2^x = n. In that case, a(n)=0. To prove that n is *not* in A051204, it is sufficient to find a modulus m for which the (finite) set of all possible values of 2^x and y^2 allows us to deduce that y^2 - 2^x can never equal n. The present sequence lists the smallest such m>0, if it exists.
LINKS
EXAMPLE
a(0)=a(1)=0 because 0=1^2-2^0 and 1=3^2-2^3 are in A051204. Similarly, n=2 through n=5 are in A051204, i.e., there are (x,y) such that n=y^2-2^x, but for n=6 such (x,y) cannot exist:
a(6)=12 because for all m<12 the equation y^2-2^x = 6 has a solution (mod m), but not so for m=12: Indeed, y^2 equals 0, 1, 4 or 9 (mod 12) and 2^x equals 1, 2, 4 or 8 (mod 12). Therefore y^2-2^x can never be equal to 6, else the equality would also hold modulo m=12.
PROG
(PARI) A200512(n, b=2, p=3)={ my( x=0, qr, bx, seen ); for( m=3, 9e9, while( x^p < m, issquare(b^x+n) & return(0); x++); qr=vecsort(vector(m, y, y^2-n)%m, , 8); seen=0; bx=1; until( bittest(seen+=1<<bx, bx=bx*b%m), for(i=1, #qr, qr[i]<bx & next; qr[i]>bx & break; next(3))); return(m))}
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Nov 18 2011
STATUS
approved