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-3 of 3 results.

A215892 a(n) = 2^n - n^k, where k is the largest integer such that 2^n >= n^k.

Original entry on oeis.org

0, 5, 0, 7, 28, 79, 192, 431, 24, 717, 2368, 5995, 13640, 29393, 0, 47551, 157168, 393967, 888576, 1902671, 3960048, 1952265, 8814592, 23788807, 55227488, 119868821, 251225088, 516359763, 344741824, 1259979967, 3221225472, 7298466623, 15635064768
Offset: 2

Views

Author

Alex Ratushnyak, Aug 25 2012

Keywords

Examples

			a(2) = 2^2 - 2^2 = 0,
a(3) = 2^3 - 3 = 5,
a(4) = 2^4 - 4^2 = 0,
a(5) = 2^5 - 5^2 = 7,
a(6)..a(9) are 2^n - n^2,
a(10)..a(15) are 2^n - n^3,
a(16)..a(22) are 2^n - n^4, and so on.
		

Crossrefs

Programs

  • Magma
    [2^n - n^Floor(n*Log(n, 2)): n in [2..40]]; // Vincenzo Librandi, Jan 14 2019
  • Mathematica
    Table[2^n - n^Floor[n*Log[n, 2]], {n, 2, 35}] (* T. D. Noe, Aug 27 2012 *)
  • Python
    for n in range(2,100):
        a = 2**n
        k = 0
        while n**(k+1) <= a:
            k += 1
        print(a - n**k, end=',')
    

Formula

a(n) = 2^n - n^floor(n*log_n(2)), where log_n is the base-n logarithm.

A243860 a(n) = 2^(n+1) - (n-1)^2.

Original entry on oeis.org

1, 4, 7, 12, 23, 48, 103, 220, 463, 960, 1967, 3996, 8071, 16240, 32599, 65340, 130847, 261888, 523999, 1048252, 2096791, 4193904, 8388167, 16776732, 33553903, 67108288, 134217103, 268434780, 536870183, 1073741040, 2147482807, 4294966396, 8589933631, 17179868160, 34359737279, 68719475580
Offset: 0

Views

Author

Juri-Stepan Gerasimov, Jun 12 2014

Keywords

Comments

Sequences of the form (k-1)^m - m^(k+1):
k\m | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
-----------------------------------------------------------------------
0 | 1 | -2 | -1 | -4 | -3 | -6 | -5 |
1 | 1 | -1 | -4 | -9 | -16 | -25 | -36 |
2 | 1 | 0 | -7 | -26 | -63 | -124 | -215 |
3 | 1 | 1 | -12 | -73 | -240 | -593 | -1232 |
4 | 1 | 2 | -23 | -216 | -943 | -2882 | -7047 |
5 | 1 | 3 | -43 | -665 | -3840 | -14601 | -42560 |
6 | 1 | 4 | -103 | -2062 | -15759 | -75000 | -264311 |
7 | 1 | 5 | -220 | -6345 | -64240 | -382849 | -1632960 |
8 | 1 | 6 | -463 | -19340 | -259743 | -1936318 | -9960047 |
9 | 1 | 7 | -960 | -58537 | -1044480 | -9732857 | -60204032 |
10 | 1 | 8 | -1967 | -176418 | -4187743 | -48769076 | -362265615 |
11 | 1 | 9 | -3996 | -530441 | -16767216 | -244040625 | -2175782336 |

Examples

			1 = 2^(0+1) - (0-1)^2, 4 = 2^(1+1) - (1-1)^2, 7 = 2^(2+1) - (2-1)^2.
		

Crossrefs

Sequences of the form (k-1)^m - m^(k+1): A000012 (m = 0), A023444 (m = 1), (-1)*(this sequence) for m = 2, A114285 (k = 0),(A000007-A000290) for k = 1, A024001 (k = 2), A024014 (k = 3), A024028 (k = 4), A024042 (k = 5), A024056 (k = 6), A024070 (k = 7), A024084 (k = 8), A024098 (k = 9), A024112 (k = 10), A024126 (k = 11).

Programs

  • Magma
    [2^(n+1) - (n-1)^2: n in [0..35]];
    
  • Maple
    A243860:=n->2^(n + 1) - (n - 1)^2; seq(A243860(n), n=0..30); # Wesley Ivan Hurt, Jun 12 2014
  • Mathematica
    Table[2^(n + 1) - (n - 1)^2, {n, 0, 30}] (* Wesley Ivan Hurt, Jun 12 2014 *)
    LinearRecurrence[{5,-9,7,-2},{1,4,7,12},40] (* Harvey P. Dale, Nov 29 2015 *)
  • PARI
    Vec((6*x^3-4*x^2-x+1)/((x-1)^3*(2*x-1)) + O(x^100)) \\ Colin Barker, Jun 12 2014

Formula

a(n) = 5*a(n-1)-9*a(n-2)+7*a(n-3)-2*a(n-4). - Colin Barker, Jun 12 2014
G.f.: (6*x^3-4*x^2-x+1) / ((x-1)^3*(2*x-1)). - Colin Barker, Jun 12 2014

A182360 Primes of the form 2^n - n^4.

Original entry on oeis.org

1902671, 33163807, 8588748671, 140737483475647, 562949947656511, 2251799806920047
Offset: 1

Views

Author

Alex Ratushnyak, Apr 26 2012

Keywords

Crossrefs

Showing 1-3 of 3 results.