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.

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

This page as a plain text file.
%I A200512 #16 Jan 03 2016 04:37:51
%S A200512 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,
%T A200512 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,
%U A200512 15,0,0,16,16,0,24,0,0,0,0,12,24,0,40,15,20,112,0
%N A200512 Least m>0 such that n = y^2 - 2^x (mod m) has no solution, or 0 if no such m exists.
%C A200512 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.
%H A200512 M. F. Hasler, <a href="/A200512/b200512.txt">Table of n, a(n) for n = 0..688</a>
%e A200512 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:
%e A200512 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.
%o A200512 (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))}
%Y A200512 Cf. A051204-A051221, A200505-A200520.
%K A200512 nonn
%O A200512 0,7
%A A200512 _M. F. Hasler_, Nov 18 2011