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.

Showing 1-5 of 5 results.

A051204 Nonnegative numbers of the form x^2-2^y.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 8, 9, 12, 14, 15, 16, 17, 20, 21, 23, 24, 28, 32, 33, 34, 35, 36, 41, 45, 47, 48, 49, 56, 57, 60, 62, 63, 64, 65, 68, 73, 77, 79, 80, 84, 89, 92, 96, 97, 98, 99, 105, 112, 113, 117, 119, 120, 128, 129, 132, 136, 137, 140, 142, 143, 144, 153, 161, 164
Offset: 1

Views

Author

Keywords

Examples

			5 is in the sequence because 5 can be written as 3^2-2^2
		

Crossrefs

Cf. A051213.

Programs

  • Mathematica
    max = 200; Clear[f]; f[m_] := f[m] = Select[Table[x^2 - 2^y, {y, 0, m}, {x, Floor[2^(y/2)], Ceiling[Sqrt[2^y + max]]}] // Flatten // Union, 0 <= # <= max &]; f[1]; f[m = 2]; While[f[m] != f[m/2], m = 2 m]; Print["m = ", m]; A051204 = f[m] (* Jean-François Alcover, May 13 2017 *)

Formula

{n: A247763(n) > 0 }. - R. J. Mathar, Jul 24 2022

Extensions

Corrected by Henry Bottomley, Jul 24 2000

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

Original entry on oeis.org

0, 0, 0, 0, 0, 15, 12, 0, 0, 20, 16, 24, 0, 32, 20, 0, 0, 28, 12, 56, 15, 16, 16, 0, 112, 68, 16, 40, 0, 20, 12, 0, 0, 52, 20, 15, 80, 16, 16, 0, 112, 36, 12, 56, 33, 28, 28, 0, 0, 20, 15, 40, 128, 16, 12, 0, 117, 48, 16, 24, 0, 44, 28, 0, 0, 15, 12, 40, 63
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 A051213, i.e., not of the form 2^x-y^2. On the other hand, if there are integers x, y such that n=2^x-y^2, then we know that a(n)=0.
a(519) > 20000 if it is nonzero.
It remains to show whether "a(n)=0" is equivalent to "n is in A051213". For example, one can show that 519 is not in A051213, but we don't know a(519) yet. - M. F. Hasler, Oct 23 2014
a(519) = 131235. - Seiichi Azuma, Apr 05 2025

Examples

			See A200507 for motivation and examples.
		

Crossrefs

Programs

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

A201125 Differences between odd powers of 2 and the next smaller square.

Original entry on oeis.org

1, 4, 7, 7, 28, 23, 92, 7, 28, 112, 448, 1792, 7168, 5503, 22012, 88048, 166831, 296599, 444943, 296863, 1187452, 4749808, 7135951, 4817239, 19268956, 77075824, 118490767, 94338007, 377352028, 1509408112, 3000631951, 5928526807, 11566105231, 21968416927, 39281659711, 59942622847, 45402459391, 181609837564, 726439350256
Offset: 1

Views

Author

Hugo Pfoertner, Nov 27 2011

Keywords

Examples

			a(1)=2^1-1^1=1, a(2)=2^3-2^2=4, a(3)=2^5-5^2=32-25=7
		

Crossrefs

Programs

  • Mathematica
    Table[2^n-Floor[Sqrt[2^n]]^2,{n,1,81,2}] (* Harvey P. Dale, Feb 25 2018 *)

Formula

a(n) = 2^(2*n-1) - floor(sqrt(2^(2*n-1)))^2.
Apparently a(n) = A095803(n)/4 for n >= 1. - Hugo Pfoertner, Dec 07 2022

A056007 Difference between 2^n and largest square strictly less than 2^n.

Original entry on oeis.org

1, 1, 3, 4, 7, 7, 15, 7, 31, 28, 63, 23, 127, 92, 255, 7, 511, 28, 1023, 112, 2047, 448, 4095, 1792, 8191, 7168, 16383, 5503, 32767, 22012, 65535, 88048, 131071, 166831, 262143, 296599, 524287, 444943, 1048575, 296863, 2097151, 1187452, 4194303
Offset: 0

Views

Author

Henry Bottomley, Jul 24 2000

Keywords

Comments

Note that this is not a strictly ascending sequence. - Alonso del Arte, Apr 28 2022

Examples

			a(5) = 2^5 - 5^2 =  7;
a(6) = 2^6 - 7^2 = 15.
		

Crossrefs

Programs

  • Mathematica
    Table[2^n - Floor[Sqrt[2^n - Boole[EvenQ[n]]]]^2, {n, 0, 47}] (* Alonso del Arte, Apr 28 2022 *)
  • PARI
    a(n) = if(n%2, sqrtint(1<Kevin Ryde, Oct 12 2022
  • Python
    from math import isqrt
    def a(n): return 2**n - isqrt(2**n-1)**2
    print([a(n) for n in range(43)]) # Michael S. Branicky, Apr 29 2022
    

Formula

a(n) = 2^n - (ceiling(2^(n/2)) - 1)^2 = A000079(n) - (A017912(n) - 1)^2. - Vladeta Jovovic, May 01 2003
a(n) = A071797(A000079(n)). - Michel Marcus, Apr 29 2022
a(n) = 2^n - A357754(n). - Kevin Ryde, Oct 12 2022

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
Showing 1-5 of 5 results.