OFFSET
0,3
COMMENTS
If such an m>0 exists, this proves that n is not in A051218, i.e., not of the form 7^x-y^2. On the other hand, if there are integers x, y such that n=7^x-y^2, then we know that a(n)=0.
a(432) is at least of order 10^5.
LINKS
M. F. Hasler, Table of n, a(n) for n = 0..431
EXAMPLE
a(2)=3 since quadratic residues mod 3 (i.e. possible values for y^2 mod 3) are {0,1}, and 7^x is always congruent to 1 (mod 3), therefore there cannot be any (x,y) such that 7^x-y^2 = 2. The modulus m=3 is the least number for which this equation has no solution in Z/mZ: For m=1 the equation is always true, and for m=2 one always has the solution x=0 and y=0 (for even n) or y=1 (for odd n).
PROG
(PARI) A200507(n, b=7, 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, i, i^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