A200512 Least m>0 such that n = y^2 - 2^x (mod m) has no solution, or 0 if no such m exists.
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
Keywords
Examples
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.
Links
- M. F. Hasler, Table of n, a(n) for n = 0..688
Programs
-
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 & break; next(3))); return(m))}
Comments