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.

A014480 Expansion of g.f. (1+2*x)/(1-2*x)^2.

Original entry on oeis.org

1, 6, 20, 56, 144, 352, 832, 1920, 4352, 9728, 21504, 47104, 102400, 221184, 475136, 1015808, 2162688, 4587520, 9699328, 20447232, 42991616, 90177536, 188743680, 394264576, 822083584, 1711276032, 3556769792, 7381975040, 15300820992, 31675383808, 65498251264
Offset: 0

Views

Author

Keywords

Comments

Number of binary trees of size n and height n-1, computed from size n=3 onward; i.e. A014480(n) = A073345(n+3,n+2). (For sizes n=0 through 2 there are no such trees.)
Also determinant of the n X n matrix M(i,j)=binomial(2i+2j,i+j). - Benoit Cloitre, Mar 27 2004
Subdiagonal in triangle displayed in A128196. - Peter Luschny, Feb 26 2007
From Jaume Oliver Lafont, Nov 08 2009: (Start)
From two BBP-type formulas by Knuth, (page 6 of the reference)
Sum_{n>=0} 1/a(n) = 2^(1/2)*log(1+2^(1/2))
Sum_{n>=0} (-1)^n/a(n) = 2^(1/2)*atan(1/2^(1/2))
(End)
Create a triangle with first column T(n,1)=1+4*n for n=0 1 2... The remaining terms T(r,c)=T(r,c-1)+T(r-1,c-1). T(n,n+1)=a(n). - J. M. Bergot, Dec 18 2012

Examples

			(1 + 2*x)/(1-2*x)^2 = 1 + 6*x + 20*x^2 + 56*x^3 + 144*x^4 + 352*x^5 + 832*x^6 + ...
		

Crossrefs

Leftmost column of A167580 (shifted).

Programs

  • Haskell
    a014480 n = a014480_list !! n
    a014480_list = 1 : 6 : map (* 4)
       (zipWith (-) (tail a014480_list) a014480_list)
    -- Reinhard Zumkeller, Jan 22 2012
    
  • Magma
    [2^n*(2*n + 1): n in [0..35]]; // Vincenzo Librandi, Oct 20 2014
  • Maple
    a:=n-> sum(2^n*n^binomial(j,n)/2,j=1..n): seq(a(n),n=1..29); # Zerinvary Lajos, Apr 18 2009
  • Mathematica
    CoefficientList[ Series[(1 + 2*x)/(1 - 2*x)^2, {x, 0, 28}], x]
    LinearRecurrence[{4, -4}, {1, 6}, 29] (* Robert G. Wilson v, Dec 26 2012 *)
    Table[2^n (2*n + 1), {n, 0, 28}] (* Fred Daniel Kline, Oct 20 2014 *)
  • PARI
    Vec((1+2*x)/(1-2*x)^2+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
    

Formula

a(n) = (2n+1)*2^n = 4a(n-1)-4a(n-2) = 4*A052951(n-1) = a(n-1)+A052951(n) = a(n-1)*(2+4/(2n-1)) = A054582(n, n). - Henry Bottomley, May 16 2001
E.g.f.: x*cosh(sqrt(2)*x) = x + 6x^3/3! + 20x^5/5! + 56x^7/7! +... - Ralf Stephan, Mar 03 2005
From Reinhard Zumkeller, Apr 27 2006: (Start)
a(n) = A118416(n+1,n+1) = A118413(n+1,n+1);
A001511(a(n)) = A003602(a(n));
A117303(a(n)) = a(n). (End)
Row sums of triangle A132775 - Gary W. Adamson, Aug 29 2007
Row sums of triangle A134233 - Gary W. Adamson, Oct 14 2007
From Johannes W. Meijer, Nov 23 2009: (Start)
a(n) = 3*a(n-1) - 2^(n-1)*(2*n-5) with a(0) = 1.
a(n) = 3*a(n-1) - 2*a(n-2) + 2^n with a(0) = 1 and a(1) = 6.
(End)
G.f.: -G(0) where G(k) = 1 - (2*k+2)/(1 - x/(x - (k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Dec 06 2012
E.g.f.: Q(0), where Q(k)= 1 + 4*x/( 1 - 1/(1 + 2*(k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 11 2013

A118413 Triangle read by rows: T(n,k) = (2*n-1)*2^(k-1), 0

Original entry on oeis.org

1, 3, 6, 5, 10, 20, 7, 14, 28, 56, 9, 18, 36, 72, 144, 11, 22, 44, 88, 176, 352, 13, 26, 52, 104, 208, 416, 832, 15, 30, 60, 120, 240, 480, 960, 1920, 17, 34, 68, 136, 272, 544, 1088, 2176, 4352, 19, 38, 76, 152, 304, 608, 1216, 2432, 4864, 9728, 21, 42, 84, 168
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 27 2006

Keywords

Comments

Central terms give A118415; row sums give A118414;
T(n,1) = A005408(n-1);
T(n,2) = A016825(n-1) for n>1;
T(n,3) = A017113(n-1) for n>2;
T(n,4) = A051062(n-1) for n>3;
T(n,n-2) = A052951(n-1) for n>2;
T(n,n) = A014480(n-1) = A118416(n,n);
A001511(T(n,k)) = A002260(n,k);
A003602(T(n,k)) = A002024(n,k).
G.f.: x*y*(1 + x + 2*x*y - 6*x^2*y)/((1 - x)^2*(1 - 2*x*y)^2). - Stefano Spezia, Dec 22 2024

Examples

			   1
   3   6
   5  10  20
   7  14  28  56
   9  18  36  72 144
  11  22  44  88 176 352
  13  26  52 104 208 416  832
  15  30  60 120 240 480  960 1920
  17  34  68 136 272 544 1088 2176 4352
  19  38  76 152 304 608 1216 2432 4864 9728
  ...
		

Crossrefs

Programs

  • Mathematica
    Select[Flatten[Table[(2n-1)2^(k-1),{n,20},{k,0,n}]],IntegerQ] (* Harvey P. Dale, Jan 17 2024 *)
  • Python
    from math import isqrt, comb
    def A118413(n):
        a = (m:=isqrt(k:=n<<1))+(k>m*(m+1))
        return ((a<<1)-1)<Chai Wah Wu, Jun 20 2025

A099573 Reverse of number triangle A054450.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 4, 5, 1, 1, 5, 5, 8, 8, 1, 1, 6, 6, 12, 12, 13, 1, 1, 7, 7, 17, 17, 21, 21, 1, 1, 8, 8, 23, 23, 33, 33, 34, 1, 1, 9, 9, 30, 30, 50, 50, 55, 55, 1, 1, 10, 10, 38, 38, 73, 73, 88, 88, 89, 1, 1, 11, 11, 47, 47, 103, 103, 138, 138, 144, 144, 1, 1, 12, 12, 57, 57, 141, 141, 211, 211, 232, 232, 233
Offset: 0

Views

Author

Paul Barry, Oct 23 2004

Keywords

Examples

			First few rows of the array:
  1, 1, 2, 3,  5,  8, ... (A000045)
  1, 1, 3, 4,  8, 12, ... (A052952)
  1, 1, 4, 5, 12, 17, ... (A054451)
  1, 1, 5, 6, 17, 23, ... (A099571)
  1, 1, 6, 7, 23, 30, ... (A099572)
  ...
Triangle begins as:
  1;
  1, 1;
  1, 1, 2;
  1, 1, 3, 3;
  1, 1, 4, 4,  5;
  1, 1, 5, 5,  8,  8;
  1, 1, 6, 6, 12, 12, 13;
  1, 1, 7, 7, 17, 17, 21, 21;
  1, 1, 8, 8, 23, 23, 33, 33, 34;
  1, 1, 9, 9, 30, 30, 50, 50, 55, 55;
		

Crossrefs

Cf. A099571, A099572, A099574 (diagonal sums), A099575.

Programs

  • Magma
    [(&+[Binomial(n-j,j): j in [0..Floor(k/2)]]): k in [0..n], n in [0..15]]; // G. C. Greubel, Jul 25 2022
    
  • Mathematica
    T[n_, k_]:= Sum[Binomial[n-j,j], {j,0,Floor[k/2]}];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Jul 25 2022 *)
  • SageMath
    def A099573(n,k): return sum(binomial(n-j, j) for j in (0..(k//2)))
    flatten([[A099573(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Jul 25 2022

Formula

Number triangle T(n, k) = Sum_{j=0..floor(k/2)} binomial(n-j, j) if k <= n, 0 otherwise.
T(n, n) = A000045(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A099574(n).
Sum_{k=0..n} T(n, k) = A029907(n+1).
Antidiagonals of the following array: the first row equals the Fibonacci numbers, (1, 1, 2, 3, 5, ...), and the (n+1)-st row is obtained by the matrix-vector product A128174 * n-th row. - Gary W. Adamson, Jan 19 2011
From G. C. Greubel, Jul 25 2022: (Start)
T(n, n-1) = A052952(n-1), n >= 1.
T(n, n-2) = A054451(n-2), n >= 2.
T(n, n-3) = A099571(n-3), n >= 3.
T(n, n-4) = A099572(n-4), n >= 4. (End)

A123097 Triangle read by rows: T(n,k) = binomial(n-2, k-1) + n*binomial(n-1, k-1), 1 <= k <= n, starting with T(1, 1) = 1.

Original entry on oeis.org

1, 3, 2, 4, 7, 3, 5, 14, 13, 4, 6, 23, 33, 21, 5, 7, 34, 66, 64, 31, 6, 8, 47, 115, 150, 110, 43, 7, 9, 62, 183, 300, 295, 174, 57, 8, 10, 79, 273, 539, 665, 525, 259, 73, 9, 11, 98, 388, 896, 1330, 1316, 868, 368, 91, 10, 12, 119, 531, 1404, 2436, 2898, 2394, 1356, 504, 111, 11
Offset: 1

Views

Author

Gary W. Adamson and Roger L. Bagula, Nov 05 2006

Keywords

Comments

Triangle is M*P, where M is the infinite bidiagonal matrix with (1,2,3,...) in the main diagonal and (1,1,1,...) in the subdiagonal and P is Pascal's triangle as an infinite lower triangular matrix. The triangle A124727 is P*M.

Examples

			First few rows of the triangle are
  1;
  3,  2;
  4,  7,  3;
  5, 14, 13,  4
  6, 23, 33, 21,  5;
  7, 34, 66, 64, 31,  6;
  ...
		

Crossrefs

Cf. A052951 (row sums).

Programs

  • Magma
    A123097:= func< n,k | n eq 1 select 1 else Binomial(n-2, k-1) + n*Binomial(n-1, k-1) >;
    [A123097(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Jul 21 2021
    
  • Maple
    T:=proc(n,k) if n=1 and k=1 then 1 elif n=1 then 0 else binomial(n-2,k-1)+n*binomial(n-1,k-1) fi end: for n from 1 to 12 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form
  • Mathematica
    T[n_, k_]= If[n==1, 1, Binomial[n-2, k-1] + n*Binomial[n-1, k-1]];
    Table[T[n, k], {n, 12}, {k, n}]//Flatten (* G. C. Greubel, Jul 21 2021 *)
  • PARI
    T(n,k) = if ((n==1), (k==1), binomial(n-2,k-1)+n*binomial(n-1,k-1));
    matrix(11, 11, n, k, T(n,k)) \\ Michel Marcus, Nov 09 2019
    
  • Sage
    def A123097(n,k): return 1 if (n==1) else binomial(n-2, k-1) + n*binomial(n-1, k-1)
    flatten([[A123097(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Jul 21 2021

Formula

Sum_{k=1..n} T(n, k) = 2^(n-2)*(2*n + 1) - (1/2)*[n=1] = A052951(n-1). - G. C. Greubel, Jul 21 2021

Extensions

Edited by N. J. A. Sloane, Nov 24 2006

A348407 a(n) = ((n+1)*3*2^(n+1) + 29*2^n + (-1)^n)/9.

Original entry on oeis.org

4, 9, 21, 47, 105, 231, 505, 1095, 2361, 5063, 10809, 22983, 48697, 102855, 216633, 455111, 953913, 1995207, 4165177, 8679879, 18058809, 37515719, 77827641, 161247687, 333680185, 689729991, 1424199225, 2937876935, 6054710841, 12467335623, 25650499129, 52732654023, 108328619577
Offset: 0

Views

Author

Paul Curtz and Thomas Scheuerle, Oct 17 2021

Keywords

Comments

The ratio (count of ones)/(count of zeros) in the binary expansion of a(n) is > 1/2 and <= 5 for all n > 0, this is because the division by 9 adds a repeating pattern 111000... after some binary digits.
This sequence has in its "partial binomial transform" (see formula section) no other constants than 2 and 1 despite of its more complicated looking closed form expression. This transform has a deep connection to the Grünwald-Letnikov fractional derivative if we replace the order of the derivative with the variable x: D^x*f(x).

Crossrefs

Programs

  • Mathematica
    Array[((# + 1)*3*2^(# + 1) + 29*2^# + (-1)^#)/9 &, 33, 0] (* Michael De Vlieger, Oct 19 2021 *)
    LinearRecurrence[{3,0,-4},{4,9,21},40] (* Harvey P. Dale, Aug 12 2023 *)

Formula

a(n) = round(((n+1)*3*2^(n+1) + 29*2^n)/9).
a(n) = 2^(n+2) + A113861(n).
a(n) = 2^(n+2) + n*2^n - A045883(n) = 2^(n+2) + n*2^n - round(((3*n+1)*2^n)/9).
a(n+1) - 2*a(n) = A001045(n+2).
a(n) = A034007(n+3) + A045883(n-1) for n > 0.
A partial binomial transform in two parts:
(Partial means a diagonal in a difference table a(0), a(2)-a(1), ... . This is partial because one diagonal alone is no invertible transform.)
A001787(n+2) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(2*n-k)
= (n+2)*2^(n+1).
A052951(n+1) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*(a(1+2*n-k) - a(2*n-k))
= (n+2)*2^(n+1) + 2^n.
The inverse transform:
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*(k+2)*2^(k+1)
+ Sum_{k=0..floor((n-1)/2)} binomial(n-k-1, k)*((k+2)*2^(k+1) + 2^k).
From Stefano Spezia, Oct 20 2021: (Start)
G.f.: (4 - 3*x - 6*x^2)/((1 + x)*(1 - 2*x)^2).
a(n) = 3*a(n-1) - 4*a(n-3) for n > 2. (End)
Showing 1-5 of 5 results.