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.

A132750 A132749 * [1, 2, 3, ...] = A007318 * A065190.

Original entry on oeis.org

1, 4, 9, 21, 49, 113, 257, 577, 1281, 2817, 6145, 13313, 28673, 61441, 131073, 278529, 589825, 1245185, 2621441, 5505025, 11534337, 24117249, 50331649, 104857601, 218103809, 452984833, 939524097, 1946157057, 4026531841
Offset: 0

Views

Author

Gary W. Adamson, Aug 28 2007

Keywords

Comments

Equals double binomial transform of [1, 2, -3, 7, -15, 31, -63, 127, -255, ...]. - Gary W. Adamson, Jul 23 2008
For n >= 1, also the number of cliques in the n-hypercube graph Q_n. - Eric W. Weisstein, Mar 31 2017

Examples

			a(3) = 21 = (1, 3, 3, 1) dot (1, 3, 2, 5) = (1 + 9 + 6 + 5) = 21; where A065190 = (1, 3, 2, 5, 4, 7, 6, 9, ...).
		

Crossrefs

Programs

  • GAP
    Concatenation([1], List([1..30], n-> n*2^(n-1) + 2^n + 1 )); # G. C. Greubel, Nov 20 2019
  • Magma
    [n*2^(n-1) + 2^n + 1 - 0^n : n in [0..30]]; // Wesley Ivan Hurt, Sep 26 2014
    
  • Maple
    A132750:=n->n*2^(n-1)+2^n+1-0^n: seq(A132750(n), n=0..30); # Wesley Ivan Hurt, Sep 26 2014
  • Mathematica
    Join[{1}, Table[n*2^(n-1) +2^n +1, {n, 30}]] (* Wesley Ivan Hurt, Sep 26 2014 *)
    Join[{1}, LinearRecurrence[{5,-8,4}, {4,9,21}, 30]] (* Vincenzo Librandi, Apr 01 2017 *)
  • PARI
    vector(31, n, if(n==1, 1, (n-1)*2^(n-2) + 2^(n-1) + 1)) \\ G. C. Greubel, Nov 20 2019
    
  • Sage
    [1]+[n*2^(n-1) + 2^n + 1 for n in (1..30)] # G. C. Greubel, Nov 20 2019
    

Formula

A132749 as an infinite lower triangular matrix * vector [1, 2, 3, ...]. Binomial transform of A065190 (with an incorrect offset)
Row sums of triangle A135224. - Gary W. Adamson, Nov 23 2007
G.f.: (1-x-3*x^2+4*x^3)/((1-x)*(1-2*x)^2). - Colin Barker, Aug 09 2012
a(n) = n*2^(n-1) + 2^n + 1 - 0^n. - Tim Smith, Sep 25 2014
a(n) = 5*a(n-1) - 8*a(n-2) + 4*a(n-3). - Wesley Ivan Hurt, Sep 26 2014
E.g.f.: -1 + exp(x) + (1+x)*exp(2*x). - G. C. Greubel, Nov 20 2019

A132752 Triangle T(n, k) = 2*A132749(n, k) - 1, read by rows.

Original entry on oeis.org

1, 3, 1, 3, 3, 1, 3, 5, 5, 1, 3, 7, 11, 7, 1, 3, 9, 19, 19, 9, 1, 3, 11, 29, 39, 29, 11, 1, 3, 13, 41, 69, 69, 41, 13, 1, 3, 15, 55, 111, 139, 111, 55, 15, 1, 3, 17, 71, 167, 251, 251, 167, 71, 17, 1
Offset: 0

Views

Author

Gary W. Adamson, Aug 28 2007

Keywords

Examples

			First few rows of the triangle are:
  1;
  3,  1;
  3,  3,  1;
  3,  5,  5,  1;
  3,  7, 11,  7,  1;
  3,  9, 19, 19,  9,  1;
  3, 11, 29, 39, 29, 11, 1;
  ...
		

Crossrefs

Programs

  • Magma
    A132752:= func< n,k | k eq n select 1 else k eq 0 select 3 else 2*Binomial(n,k) -1 >;
    [A132752(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Feb 16 2021
  • Mathematica
    T[n_, k_]:= If[k==n, 1, If[k==0, 3, 2*Binomial[n, k] -1 ]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 16 2021 *)
  • Sage
    def A132752(n,k): return 1 if k==n else 3 if k==0 else 2*binomial(n,k) -1
    flatten([[A132752(n,k) for k in [0..n]] for n in [0..12]]) # G. C. Greubel, Feb 16 2021
    

Formula

T(n, k) = 2*A132749(n, k) - 1, an infinite lower triangular matrix.
From G. C. Greubel, Feb 16 2021: (Start)
T(n, k) = A109128(n, k) with T(n, 0) = 3.
Sum_{k=0..n} T(n, k) = 2^(n+1) -n +1 -2*[n=0] = A132753(n) - 2*[n=0]. (End)

A083318 a(0) = 1; for n>0, a(n) = 2^n + 1.

Original entry on oeis.org

1, 3, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049, 4097, 8193, 16385, 32769, 65537, 131073, 262145, 524289, 1048577, 2097153, 4194305, 8388609, 16777217, 33554433, 67108865, 134217729, 268435457, 536870913, 1073741825, 2147483649
Offset: 0

Views

Author

Paul Barry, Apr 25 2003

Keywords

Comments

Inverse binomial transform of A005056.
Also, A000533 interpreted as binary numbers, written in base 10. Numbers whose representation in base 2 is has n+1 digits and the digit "1" is the initial and final digit and if n>1 then the internal digits are "0" (see example). - Omar E. Pol, Feb 24 2008
a(n) equals the number of ternary sequences of length n such that no two consecutive terms differ by 1. - David Nacin, May 31 2017

Examples

			From _Omar E. Pol_, Feb 24 2008: (Start)
------------------------------
n .... a(n) .. a(n) in base 2
------------------------------
0 ..... 1 ..... 1
1 ..... 3 ..... 11
2 ..... 5 ..... 101
3 ..... 9 ..... 1001
4 .... 17 ..... 10001
5 .... 33 ..... 100001
6 .... 65 ..... 1000001
7 ... 129 ..... 10000001
8 ... 257 ..... 100000001
9 ... 513 ..... 1000000001
(End)
G.f. = 1 + 3*x + 5*x^2 + 9*x^3 + 17*x^4 + 33*x^5 + 65*x^6 + 129*x^7 + ... - _Michael Somos_, Jun 04 2016
		

Crossrefs

Except for the leading term, the same as A000051.

Programs

  • GAP
    Concatenation([1], List([1..40], n-> 2^n +1)); # G. C. Greubel, Nov 20 2019
  • Magma
    [2^n+1-0^n : n in [0..40]]; // Vincenzo Librandi, Sep 01 2011
    
  • Maple
    seq(`if`(n=0, 1, 2^n + 1), n=0..40); # G. C. Greubel, Nov 20 2019
  • Mathematica
    Join[{1},2^Range[40]+1] (* Harvey P. Dale, May 17 2013 *)
  • PARI
    {a(n) = if( n<1, n==0, 2^n + 1)}; /* Michael Somos, Jun 04 2016 */
    
  • Sage
    [1]+[2^n +1 for n in (1..40)] # G. C. Greubel, Nov 20 2019
    

Formula

a(n) = 2^n + 1^n - 0^n.
G.f.: (1-2*x^2)/((1-x)*(1-2x)).
E.g.f.: exp(2*x) + exp(x) - exp(0).
a(n) = Sum_{k=0..n} 0^(k*(n-k))*2^(n-k). - Paul Barry, Feb 09 2005
a(n) = Min{m: A008687(m) = n+1}. - Reinhard Zumkeller, Jul 25 2006
Row sums of triangle A132749; = binomial transform of [1, 2, 0, 2, 0, 2, 0, 2, ...]. - Gary W. Adamson, Aug 28 2007
A020650(a(n)) = 1. - Yosu Yurramendi, Jun 01 2016

Extensions

Edited by N. J. A. Sloane, Sep 28 2007
Showing 1-3 of 3 results.