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.

Previous Showing 21-22 of 22 results.

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

Original entry on oeis.org

0, 4, 4, 0, 8, 4, 4, 0, 0, 4, 4, 9, 8, 4, 4, 0, 0, 4, 4, 0, 8, 4, 4, 9, 0, 4, 4, 0, 8, 4, 4, 80, 9, 4, 4, 0, 8, 4, 4, 63, 0, 4, 4, 80, 8, 4, 4, 9, 0, 4, 4, 45, 8, 4, 4, 0, 9, 4, 4, 9, 8, 4, 4, 0, 133, 4, 4, 80, 8, 4, 4, 15, 0, 4, 4, 63, 8, 4, 4
Offset: 0

Views

Author

M. F. Hasler, Nov 18 2011

Keywords

Comments

To prove that an integer n is in A051211, it is sufficient to find integers x,y such that y^2 - 9^x = n. In that case, a(n)=0. To prove that n is *not* in A051211, it is sufficient to find a modulus m for which the (finite) set of all possible values of 9^x and y^2 (mod m) allows us to deduce that y^2 - 9^x can never equal n. The present sequence lists the smallest such m>0, if it exists.

Examples

			See A200512 for motivation and detailed examples.
		

Crossrefs

Programs

  • PARI
    A200519(n,b=9,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))}

A362564 a(n) is the largest integer x such that n + 2^x is a square, or -1 if no such number exists.

Original entry on oeis.org

3, 1, 0, 5, 2, -1, 1, 3, 4, -1, -1, 2, -1, 1, 0, 7, 9, -1, -1, 4, 2, -1, 1, 0, -1, -1, -1, 3, -1, -1, -1, 5, 8, 1, 0, 6, -1, -1, -1, -1, 7, -1, -1, -1, 2, -1, 1, 4, 5, -1, -1, -1, -1, -1, -1, 3, 6, -1, -1, 2, -1, 1, 0, 9, 10, -1, -1, 11, -1, -1, -1, -1, 3, -1, -1, -1, 2, -1, 1, 6, -1, -1, -1, 4, -1
Offset: 1

Views

Author

Yifan Xie, Apr 24 2023

Keywords

Comments

a(n) is the maximum integer solution x of the indefinite equation n + 2^x = r^2 where n is a constant and r is a positive integer, or -1 if there are no solutions.
See A247763 for the number of solutions and for further information, references and links about this problem.
If n == 0 (mod 4), we first try x = 0 or 1; when x >= 2, the result can be derived from the result for n/4 (see formula).
If n == 2 (mod 4), the only possible values of x is 1, as otherwise n + 2^x == 2 (mod 4), so nonsquare.
If n == 3 (mod 4), the only possible values of x are 0 and 1, as otherwise n + 2^x == 3 (mod 4), so nonsquare.
If n == 1 (mod 4), or n = 4*k + 1 (k >= 0): we suggest that r = 2*m + 1, 4*k + 1 + 2^x = (2*m + 1)^2, thus k + 2^(x - 2) = m*(m + 1); if k is odd, the only possible values of x is 2 because m*(m + 1) is even.
If n = k^2 (k >= 1), 2^x = (r + k)*(r - k), so 2k must be in the form 2^i - 2^j.
The problem can be solved via reduction to three Mordell curves: n + z^3 = y^2, n + 2z^3 = y^2 or equivalently 4n + (2z)^3 = (2y)^2, n + 4z^3 = y^2 or equivalently 16n + (4z)^3 = (4y)^2, where z := 2^floor(x/3). For a given n, each of these three curves is known to have only a finite number of integer points (y,z), proving that x cannot be unbounded. - Max Alekseyev, Apr 26 2023

Examples

			See COMMENTS section for further proof.
For n = 1, 1 + 2^3 = 9 = 3^2;
for n = 4, 4 + 2^5 = 36 = 6^2;
for n = 7, 7 + 2^1 = 9 = 3^2;
for n = 9, 9 + 2^4 = 25 = 5^2.
		

Crossrefs

Programs

  • Sage
    def a362564(n): return max((3*v-2*k for k in range(3) for z,, in EllipticCurve([0,4^k*n]).integral_points() if z>=1<Max Alekseyev, Apr 26 2023

Formula

a(4*k + 2) = 1 if k + 1 is a square, or -1 otherwise.
a(4*k + 3) = 1 if 4*k + 5 is a square, or 0 is k + 1 is a square and 4*k + 5 is a nonsquare, or -1 otherwise.
a(4*k + 4) = a(k) + 2 if a(k) >= 0, or 0 if 4*k + 1 is a square and a(k) = -1, or -1 otherwise.
a(8*k + 5) = 2 if 8*k + 9 is a square, or -1 otherwise.
a((2^i - 2^j)^2) = i + j + 2 for i,j >= 0.
a(n) > -1 if A247763(n) > 0, or equivalently n is in A051204. - Thomas Scheuerle, May 02 2023
Previous Showing 21-22 of 22 results.