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.

A100326 Triangle, read by rows, where row n equals the inverse binomial of column n of square array A100324, which lists the self-convolutions of SHIFT(A003169).

Original entry on oeis.org

1, 1, 1, 3, 4, 1, 14, 20, 7, 1, 79, 116, 46, 10, 1, 494, 736, 311, 81, 13, 1, 3294, 4952, 2174, 626, 125, 16, 1, 22952, 34716, 15634, 4798, 1088, 178, 19, 1, 165127, 250868, 115048, 36896, 9094, 1724, 240, 22, 1, 1217270, 1855520, 862607, 285689, 74687, 15629, 2561, 311, 25, 1
Offset: 0

Views

Author

Paul D. Hanna, Nov 17 2004

Keywords

Comments

The leftmost column equals A003169 shift one place right.
Each column k > 0 equals the convolution of the prior column and A003169.
Row sums form A100327.
The elements of the matrix inverse are T^(-1)(n,k) = (-1)^(n+k) * A158687(n,k). - R. J. Mathar, Mar 15 2013

Examples

			Rows begin:
        1;
        1,       1;
        3,       4,      1;
       14,      20,      7,      1;
       79,     116,     46,     10,     1;
      494,     736,    311,     81,    13,     1;
     3294,    4952,   2174,    626,   125,    16,    1;
    22952,   34716,  15634,   4798,  1088,   178,   19,   1;
   165127,  250868, 115048,  36896,  9094,  1724,  240,  22,  1;
  1217270, 1855520, 862607, 285689, 74687, 15629, 2561, 311, 25,  1;
  ...
First column forms A003169 shift right.
Binomial transform of row 3 forms column 3 of square A100324: BINOMIAL([14,20,7,1]) = [14,34,61,96,140,194,259,...].
Binomial transform of row 4 forms column 4 of square A100324: BINOMIAL([79,116,46,10,1]) = [79,195,357,575,860,1224,...].
		

Crossrefs

Cf. A003169, A100324, A100327 (row sums), A158687, A264717 (central terms).

Programs

  • Haskell
    import Data.List (transpose)
    a100326 n k = a100326_tabl !! n !! k
    a100326_row n = a100326_tabl !! n
    a100326_tabl = [1] : f [[1]] where
    f xss@(xs:_) = ys : f (ys : xss) where
    ys = y : map (sum . zipWith (*) (zs ++ [y])) (map reverse zss)
    y = sum $ zipWith (*) [1..] xs
    zss@((:zs):) = transpose $ reverse xss
    -- Reinhard Zumkeller, Nov 21 2015
    
  • Maple
    A100326 := proc(n,k)
        if k < 0 or k > n then
            0 ;
        elif n = 0 then
            1 ;
        elif k = 0 then
            A003169(n)
        else
            add(procname(i+1,0)*procname(n-i-1,k-1),i=0..n-k) ;
        end if;
    end proc: # R. J. Mathar, Mar 15 2013
  • Mathematica
    lim= 9; t[0, 0]=1; t[n_, 0]:= t[n, 0]= Sum[(k+1)*t[n-1,k], {k,0,n-1}]; t[n_, k_]:= t[n, k]= Sum[t[j+1, 0]*t[n-j-1, k-1], {j,0,n-k}]; Flatten[Table[t[n, k], {n,0,lim}, {k,0,n}]] (* Jean-François Alcover, Sep 20 2011 *)
  • PARI
    T(n,k)=if(n
    				
  • SageMath
    @CachedFunction
    def T(n,k): # T = A100326
        if (k<0 or k>n): return 0
        elif (k==n): return 1
        elif (k==0): return sum((j+1)*T(n-1,j) for j in range(n))
        else: return sum(T(j+1,0)*T(n-j-1,k-1) for j in range(n-k+1))
    flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jan 30 2023

Formula

T(n, 0) = A003169(n) = Sum_{k=0..n-1} (k+1)*T(n-1, k) for n>0, with T(0, 0)=1.
T(n, k) = Sum_{i=0..n-k} T(i+1, 0)*T(n-i-1, k-1) for n > 0.
T(2*n, n) = A264717(n).
Sum_{k=0..n} T(n, k) = A100327(n).
G.f.: A(x, y) = (1 + G(x))/(1 - y*G(x)), where G(x) is the g.f. of A003169.
From G. C. Greubel, Jan 30 2023: (Start)
Sum_{k=0..n} (-1)^k*T(n, k) = A000007(n).
Sum_{k=0..n-1} (-1)^k*T(n, k) = A033999(n). (End)

A129847 a(n) = number of set partitions of {1, 2, ..., n} whose blocks consist only of elements that differ by two or less (that is, have only the forms {i}, {i,i+1}, {i,i+2}, or {i,i+1,i+2}).

Original entry on oeis.org

1, 1, 2, 5, 10, 20, 42, 87, 179, 370, 765, 1580, 3264, 6744, 13933, 28785, 59470, 122865, 253838, 524428, 1083466, 2238435, 4624595, 9554390, 19739321, 40781336, 84254032, 174068400, 359624425, 742982225, 1534997482, 3171296957, 6551883314, 13536157460
Offset: 0

Views

Author

Rhodes Peele (rpeele(AT)mail.aum.edu), May 22 2007

Keywords

Comments

(1) Bryce Duncan and I found this sequence while studying a graph invariant we call the Bell number. For a simple graph G = (V,E), we define B(G) to be the number of partitions P of V in which each block of P is an independent set of G. The sequence considered here results from choosing V = {1, 2, ..., n} and E = {(i,j) : |i - j| > 2}. (The classical Bell numbers B(n) come from the edgeless graph on n vertices.)
(2) The constant r in the formula is the dominant root of the characteristic equation of a linear homogeneous recurrence relation that also defines {a(n)}. (This recurrence relation, along with initial conditions, appears in the Mathematica program given below. The formula for a(n) is analogous to one version of the Binet formula for the Fibonacci numbers, namely F(n) = the integer nearest to (1/sqrt(5)) p^n where p is the golden mean. The shifted Fibonacci numbers F(n+1) are also graphical Bell numbers: replace the condition |i - j| > 2 with |i - j| > 1 to obtain them.
(3) Bell numbers for simple graphs satisfy the deletion-contraction identity B(G) = B(G\e) - B(G/e), but not the product identity B(G union H) = B(G)B(H) for disjoint graphs G and H. However, we do have B(B join H) = B(G)B(H) for the join of graphs G and H. The join graph G join H results from adding to their disjoint union, all possible edges that join a vertex of G to a vertex of H.
Diagonal sums of triangle A158687. - Paul Barry, Mar 24 2009
a(n) is the number of compositions (ordered partitions) of n into parts 1, 2, 3, and 4 where there are two kinds of part 3. - Joerg Arndt, Sep 16 2016
a(n) is the number of ways to tile a skew double-strip of n cells using squares, "double", and "triangular triple" tiles. Here is the skew double-strip corresponding to n=12, with 12 cells:
_ ___ _ ___ _ ___
| | | | | | |
|__|___|_|___| |___|
| | | | | | |
|_|___|_|___|_|___|,
and here are the three possible "double" tiles and two possible "triangular triple" tiles:
| | | | | | | |
| | | | _____ | | | |
| | | | | | | | | |
|_|, |_|, |_____|, |_____|, |_|
As an example, here is one of the b(12) = 3264 ways to tile the skew double-strip of 12 cells:
_ ___ _____ _______
| | | | | |
|__|_ | | | _|
| | | | |
|_____|___|_|___ _|. - Greg Dresden and Ruotong Li, Jun 12 2024

Examples

			a(4) = 10, with set partitions {{1},{2},{3}, {4}}; {{1,2}, {3}, {4}}; {{1,3}, {2}, {4}}; {{1}, {2,3}, {4}}; {{1}, {2,4}, {3}}; {{1}, {2}, {3,4}}; {{1,2,3}, {4}}; {{1}, {2,3,4}}; {{1,2}, {3,4}} and {{1,3}, {2,4}}.
		

References

  • Herbert S. Wilf, Generatingfunctiononogy (2nd Edition), Academic Press 1990, pp. 1 - 10 and pp. 20 - 23.
  • Arthur T. Benjamin and Jennifer J. Quinn, Proofs that Really Count, Dolciani Mathematical Expositions (MAA), (2003), p. 1. (A relevant combinatorial interpretation of Fibonacci numbers.)

Crossrefs

Column k=3 of A276719.

Programs

  • Maple
    a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <1|2|1|1>>^n)[4, 4]:
    seq(a(n), n=0..35);  # Alois P. Heinz, Sep 15 2016
  • Mathematica
    a[1] = 1; a[2] = 2; a[3] = 5; a[4] = 10
    a[n_] := a[n] = a[n-1] + a[n-2] + 2 a[n-3] + a[n-4]
    Table[a[n],{n,1,30}]

Formula

a(n) = the integer nearest to s r^n, where r = 2.0659948920 ... and s = 0.53979687305... . (More information in comment (2).)
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-2k} C(n-j-k,k)*C(2k,j). - Paul Barry, Mar 24 2009
G.f.: 1/(1 - x - x^2 - 2*x^3 - x^4). - Colin Barker, May 02 2012
a(n) = a(n-1) + a(n-2) + 2*(n-3) + a(n-4) with a(0) = a(1) = 1, a(2) = 2, a(3) = 5. - Taras Goy, Aug 04 2017
a(2*n) = a(n)^2 - a(n-1)^2 + a(n-2)^2 + 2*a(n-1)*(a(n+1)-a(n)). - Greg Dresden, Jul 03 2024

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 15 2016

A077936 Expansion of 1/(1 - 2*x - 2*x^2 - x^3).

Original entry on oeis.org

1, 2, 6, 17, 48, 136, 385, 1090, 3086, 8737, 24736, 70032, 198273, 561346, 1589270, 4499505, 12738896, 36066072, 102109441, 289089922, 818464798, 2317218881, 6560457280, 18573817120, 52585767681, 148879626882, 421504606246, 1193354233937, 3378597307248
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

Row sum of A158687. - Paul Barry, Mar 24 2009

Programs

  • Magma
    I:=[1,2,6]; [n le 3 select I[n] else 2*Self(n-1)+2*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jul 06 2015
  • Mathematica
    CoefficientList[Series[1/(1-2*x-2*x^2-x^3),{x,0,40}],x] (* or *) LinearRecurrence[{2,2,1},{1,2,6},40] (* Vladimir Joseph Stephan Orlovsky, Jan 30 2012 *)
  • PARI
    Vec(1/(1-2*x-2*x^2-x^3)+O(x^99)) \\ Charles R Greathouse IV, Jan 31 2012
    

Formula

a(n) = Sum_{k=0..n} Sum_{j=0..n-k} C(n-j,k)*C(2k,j). - Paul Barry, Mar 24 2009
a(n) = 2*a(n-1) + 2*a(n-2) + a(n-3) with a(0) = 1, a(1) = 2, a(2) = 6. - Taras Goy, Aug 04 2017
Showing 1-3 of 3 results.