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.

A336881 a(n) is the number of solutions (x, m) of the generalized Ramanujan-Nagell equation x^2 + n = 2^m, x > 0, m > 0, n > 0.

Original entry on oeis.org

1, 0, 1, 1, 0, 0, 5, 0, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 5, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Bernard Schott, Aug 06 2020

Keywords

Comments

Equivalently, number of representations of n as n = 2^m - x^2, m > 0, x > 0.
a(7) = 5 corresponds to Ramanujan-Nagell equation (A038198 for x, A060728 for m, Wikipedia link).
If n odd <> 7, Apéry proved in 1960 that the equation x^2 + n = 2^m has at most 2 solutions (see link).
If n odd, this equation has 2 solutions iff n = 23 or n = 2^k - 1 for some k >= 4 (link Beukers, theorem 2, p. 395).

Examples

			1^2 + 1 = 2^1 hence a(1) = 1.
3^2 + 23 = 2^5 and 45^2 + 23 = 2^11 hence a(23) = 2.
28 = 2^5 - 2^2 = 2^6 - 6^2 = 2^7 - 10^2 = 2^9 - 22^2 = 2^17 - 362^2 hence a(28) = 5.
		

Crossrefs

Extensions

More terms from Jinyuan Wang, Aug 07 2020