cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A200507 Least m>0 such that n = 7^x-y^2 (mod m) has no solution, or 0 if no such m exists.

Original entry on oeis.org

0, 0, 3, 0, 8, 3, 0, 0, 3, 7, 8, 3, 8, 0, 3, 16, 7, 3, 8, 0, 3, 16, 28, 3, 0, 16, 3, 16, 8, 3, 7, 16, 3, 0, 8, 3, 8, 7, 3, 28, 0, 3, 8, 16, 3, 0, 19, 3, 0, 0, 3, 7, 8, 3, 0, 20, 3, 16, 7, 3, 8, 100, 3, 16, 35, 3, 8, 28, 3, 16, 20, 3, 7, 16, 3, 16, 8, 3, 28
Offset: 0

Views

Author

M. F. Hasler, Nov 18 2011

Keywords

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.

Examples

			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).
		

Crossrefs

Programs

  • 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 & break; next(3))); return(m))}