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 11-16 of 16 results.

A248346 Primes of the form 2^x - y^2, with y^2 < 2^x.

Original entry on oeis.org

2, 3, 7, 23, 31, 47, 71, 79, 103, 127, 151, 199, 223, 271, 367, 431, 463, 487, 503, 727, 751, 823, 967, 1087, 1303, 1319, 1423, 1439, 1559, 1607, 1759, 1823, 1879, 1951, 1999, 2039, 2143, 3343, 3527, 3623, 3967, 4447, 4943, 5167, 5503, 5591, 5791, 6199, 6343
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 05 2014

Keywords

Comments

Primes in A051213.

Examples

			7 is in this sequence because 7 = 2^3 - 1^2 = 2^4 - 3^2 = 2^5 - 5^2 = 2^7 - 11^2 = 2^15 - 181^2.
1559 is in this sequence because 1559 = 2^19 - 723^2 is prime. - _Sean A. Irvine_, Apr 28 2022
		

Crossrefs

Primes in A056007 form a subset of the numbers in this sequence.

Programs

  • Mathematica
    Select[Union[Flatten[Table[2^x - y^2, {x, 16}, {y, 0, Floor[Sqrt[2^x]]}]]], PrimeQ] (* Alonso del Arte, Oct 05 2014 *)

Extensions

a(24)-a(38) from Alonso del Arte, Oct 05 2014
More terms and missing terms inserted by Sean A. Irvine, Apr 28 2022

A188628 a(n) = smallest k such that k*2^n - 7 is a square.

Original entry on oeis.org

7, 4, 2, 1, 1, 1, 2, 1, 11, 11, 32, 16, 8, 4, 2, 1, 4006, 2003, 9284, 4642, 2321, 107566, 53783, 313702, 156851, 1364479, 1493338, 746669, 12145148, 6072574, 3036287, 107186842, 53593421, 323781196, 161890598, 80945299, 3501584548, 1750792274, 875396137
Offset: 0

Views

Author

Michel Lagneau, Apr 06 2011

Keywords

Comments

From Michel Lagneau, Mar 04 2015: (Start)
The sequence is infinite. Proof by induction:
Given an integer n>0. Suppose there are an infinity of perfect squares of the form k*2^n - 7 = b(n)^2 for some integer k.
For all integers n, there exists an integer b(n) such that b(n)^2 == -7 (mod 2^n). If n <=3, b(n)=1 is appropriate. Suppose there exists b(n) such that b(n)^2 == -7 (mod 2^n) for some n >=3. We prove that b(n+1)^2 == -7 (mod 2^(n+1)). In the first case, we take b(n+1) = b(n) if k is even, and in the second case we take b(n+1) = 2^(n-1)- b(n). Then b(n+1)^2 = b(n)^2 - 2^n*b(n) + 2^(2n-2) == b(n)^2 - 2^n*b(n) (mod 2^(n+1)).
But b(n)^2 = k*2^n-7 => b(n)^2 - 2^n*b(n) = 2^n(k-b(n)) - 7 == - 7 (mod 2^(n+1)) because k - b(n) is even (k is odd and b(n) is odd).
With n>=3 and b(n) odd, the proof is complete.
Finally, we see that the sequence b(n) is unbounded because b(n)^2 >=2^n - 7 for all positive integers n. This completes the proof because, for all p >=n, b(p)^2 == -7 (mod 2^n).
The corresponding squares of the sequence are 1, 1, 1, 3^2, 5^2, 11^2, 11^2, 53^2, 75^2, 181^2, 181^2, 181^2, 181^2, 181^2, 181^2, 16203^2, 16203^2, 49333^2, 49333^2, 49333^2, 474955^2, ...
With the property:
b(2) + b(3) = 1+1 = 2^1;
b(3) + b(4) = 1+3 = 2^2;
b(4) + b(5) = 3+5 = 2^3;
b(5) + b(6) = 5+11 = 2^4;
b(7) + b(8) = 11+53 = 2^6;
b(8) + b(9) = 53+75=2^7;
b(9) + b(10) = 75+181=2^8;
b(15) + b(16) = 181+16203=2^14;
(End)
To get a(n), find the smallest term of A117619 that is divisible by 2^n, and divide it by 2^n. - Michel Marcus, Mar 05 2015
a(n)=1 for n=3, 4, 5, 7, 15; see A060728. - Michel Marcus, Mar 05 2015

Crossrefs

Cf. A117619 (n^2+7).

Programs

  • Maple
    A188628 := proc(n) for k from 1 do if issqr(k*2^n-7) then return k; end if; end do:
    end proc:
    for n from 0 do printf("%d,\n",A188628(n)) ; end do; # R. J. Mathar, Apr 09 2011
  • Mathematica
    f[n_] := Block[{k = 0}, While[!IntegerQ[Sqrt[k*2^n - 7]], k++]; k]; Table[f[n], {n, 0, 24}] (* Michael De Vlieger, Mar 04 2015 *)
  • PARI
    a(n) = {k=1; while (! issquare(k*2^n - 7), k++); k;} \\ Michel Marcus, Mar 04 2015

Formula

b(1) = b(2) = b(3) = 1; b(n+1)= 2^(n-1)-b(n) or b(n+1) = b(n).
k*2^n - 7 = b(n)^2 => a(n) = k = (b(n)^2 + 7)/2^n if b(n) different from b(n-1) or a(n) = a(n-1)/2 if a(n-1) is even (or if b(n) = b(n-1)).

Extensions

a(0) lowered from 8 to 7, a(25) from 2986676 to 1364479 by R. J. Mathar, Apr 09 2011
a(31)-a(38) from Michel Lagneau, Mar 04 2015

A336819 Odd values of D > 0 for which the generalized Ramanujan-Nagell equation x^2 + D = 2^m has two or more solutions in the positive integers.

Original entry on oeis.org

7, 15, 23, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, 2147483647, 4294967295, 8589934591, 17179869183, 34359738367, 68719476735
Offset: 1

Views

Author

Bernard Schott, Aug 04 2020

Keywords

Comments

D = 7 corresponds to Ramanujan-Nagell equation x^2 + 7 = 2^m with its 5 solutions (A038198 for x, A060728 for n, Wikipedia link).
If D odd <> 7, R. Apéry proved in 1960 that the equation x^2 + D = 2^m has at most 2 solutions (see links).
If D odd > 0, this equation has 2 solutions iff D = 23 or D = 2^k - 1 for some k >= 4 (link Beukers, theorem 2, p. 395).
For any solution (x,m), m is bounded by m < 435 + 10 * (log(D) / log(2)) [link Beukers, corollary 1, p. 394]. If D < 2^96, then the bound becomes m < 18 + 2 * (log(D) / log(2)) [link Beukers, corollary 2, p. 395].

Examples

			For these exceptional cases, the corresponding solutions are:
D = 7,  (x,m) = (1,3), (3,4), (5,5), (11,7), (181,15);
D = 23, (x,m) = (3,5), (45,11);
D = 2^k -1, k >= 4,  (x,m) = (1,k), (2^(k-1) - 1, 2*(k-1)).
For k = 4 and D = 15, then 1^2 + 15 = 2^4 = 16, and 7^2 + 15 = 2^6 = 64.
Remark: for k = 2 and D = 3, the two possible solutions corresponding to 2^k-1 coincide with (1, 2).
		

References

  • Richard K. Guy, Unsolved Problems in Theory of Numbers, Springer-Verlag, 2004, D10.

Crossrefs

Formula

From Colin Barker, Aug 05 2020: (Start)
G.f.: x*(7 - 6*x - 8*x^2 - 8*x^3 + 16*x^4) / ((1 - x)*(1 - 2*x)).
a(n) = 3*a(n-1) - 2*a(n-2) for n>5.
a(n) = 2^(1+n)-1 for n>3. (End)
The two formulas with a(n) are true, according to theorem 2 of Beukers' link. - Bernard Schott, Aug 07 2020

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

A098808 a(n) = 2^(n + 11) - 11.

Original entry on oeis.org

2037, 4085, 8181, 16373, 32757, 65525, 131061, 262133, 524277, 1048565, 2097141, 4194293, 8388597, 16777205, 33554421, 67108853, 134217717, 268435445, 536870901, 1073741813, 2147483637, 4294967285, 8589934581, 17179869173
Offset: 0

Views

Author

Parthasarathy Nambi, Oct 06 2004

Keywords

Examples

			a(0) = 2^11 - 11 = 2037.
a(1) = 2^12 - 11 = 4085.
		

Crossrefs

Programs

Formula

From Colin Barker, May 11 2012: (Start)
a(n) = 3*a(n-1)-2*a(n-2).
G.f.: (2037-2026*x)/((1-x)*(1-2*x)). (End)

Extensions

More terms from Stefan Steinerberger, Mar 06 2006

A227079 Solutions n to the Diophantine equation: n = (2*x^2 - 1)^2 = (6*y^2 - 5).

Original entry on oeis.org

1, 49, 289, 5041, 274266721
Offset: 0

Views

Author

Raphie Frank, Aug 08 2013

Keywords

Comments

x = {1, 2, 3, 6, 91} = A180445(n).
y = {1, 3, 7, 29, 6761} = A227077(n).
(sqrt(2*sqrt(n) + 2) - 1)^2 is a Ramanujan-Nagell Square = {1, 9, 25, 121, 32761} = A227078(n).

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 181, p. 56, Ellipses, Paris 2008.
  • L. J. Mordell, Diophantine Equations, Academic Press, NY, 1969, p. 205.

Crossrefs

Previous Showing 11-16 of 16 results.