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

A005803 Second-order Eulerian numbers: a(n) = 2^n - 2*n.

Original entry on oeis.org

1, 0, 0, 2, 8, 22, 52, 114, 240, 494, 1004, 2026, 4072, 8166, 16356, 32738, 65504, 131038, 262108, 524250, 1048536, 2097110, 4194260, 8388562, 16777168, 33554382, 67108812, 134217674, 268435400, 536870854, 1073741764, 2147483586
Offset: 0

Views

Author

Keywords

Comments

Starting with n=2, a(n) is the second-order Eulerian number <> (see A008517).
Also, number of 3 X n binary matrices avoiding simultaneously the right-angled numbered polyomino patterns (ranpp) (00;1), (01;0) and (01;1). An occurrence of a ranpp (xy;z) in a matrix A=(a(i,j)) is a triple (a(i1,j1), a(i1,j2), a(i2,j1)) where i1Sergey Kitaev, Nov 11 2004
This is the number of target DNA sequences of the correct length present after each successive cycle of the Polymerase Chain Reaction (PCR). The first two cycles produce 0 target sequences, there are 2 target sequences present after the third cycle, then 8 after the fourth cycle, and so forth. - A. Timothy Royappa, Jun 16 2012
a(n+2) = the row sums of A222403. - J. M. Bergot, Apr 04 2018

Examples

			G.f. = 1 + 2*x^3 + 8*x^4 + 22*x^5 + 52*x^6 + 114*x^7 + 240*x^8 + 494*x^9 + ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, 2nd ed. Addison-Wesley, Reading, MA, 1994, p. 270.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equivalent to second column of A008517.
a(n) = A070313 + 1 = A052515 + 2. Bisection of A077866.
Equals for n =>3 the third right hand column of A163936.
Cf. A000918 (first differences).

Programs

  • Haskell
    a005803 n = 2 ^ n - 2 * n
    a005803_list = 1 : f 1 [0, 2 ..] where
       f x (z:zs@(z':_)) = y : f y zs  where y = (x + z) * 2 - z'
    -- Reinhard Zumkeller, Jan 19 2014
    
  • Magma
    [2^n-2*n: n in [0..30]]; // Wesley Ivan Hurt, Jun 04 2014
  • Maple
    A005803:=-2*z/(2*z-1)/(z-1)**2; # conjectured by Simon Plouffe in his 1992 dissertation. Gives sequence except for three leading terms
  • Mathematica
    Table[2^n-2n,{n,0,50}] (* or *) LinearRecurrence[{4,-5,2},{1,0,0},51] (* Harvey P. Dale, May 21 2011 *)
  • PARI
    {a(n) = if( n<0, 0, 2^n - 2*n)}; /* Michael Somos, Oct 13 2002 */
    

Formula

G.f.: 1 + 2*x^3/((1-x)^2*(1-2*x)). a(n) = A008517(n-1, 2). - Michael Somos, Oct 13 2002
Equals binomial transform of [1, -1, 1, 1, 1, ...]. - Gary W. Adamson, Jul 14 2008
a(0) = 1 and a(n) = Sum_{k=0..n-3} ((-1)^(n+k+1)*binomial(2*n-1,k)*stirling1(2*n-k-3,n-k-2)), n=>1. - Johannes W. Meijer, Oct 16 2009
a(0)=1, a(1)=0, a(2)=0, a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3). - Harvey P. Dale, May 21 2011
a(n) = A000225(n+1) - A081494(n+1), n > 1. In other words, a(n) equals the sum of the elements in a Pascal triangle of depth n+1 minus the sum of the elements on its perimeter. - Ivan N. Ianakiev, Jun 01 2014
a(n) = A165900(n-1) + Sum_{i=0..n-1} a(i), for n > 0. - Ivan N. Ianakiev, Nov 24 2014
a(n) = A000225(n) - A005408(n-1). - Miquel Cerda, Nov 25 2016
E.g.f.: exp(x)*(exp(x) - 2*x). - Ilya Gutkovskiy, Nov 25 2016

A222405 Triangle read by rows: left and right edges are A002061 (1,3,7,13,21,...), interior entries are filled in using the Pascal triangle rule.

Original entry on oeis.org

1, 3, 3, 7, 6, 7, 13, 13, 13, 13, 21, 26, 26, 26, 21, 31, 47, 52, 52, 47, 31, 43, 78, 99, 104, 99, 78, 43, 57, 121, 177, 203, 203, 177, 121, 57, 73, 178, 298, 380, 406, 380, 298, 178, 73, 91, 251, 476, 678, 786, 786, 678, 476, 251, 91, 111, 342, 727, 1154, 1464, 1572, 1464, 1154, 727, 342, 111
Offset: 0

Views

Author

N. J. A. Sloane, Feb 18 2013

Keywords

Examples

			Triangle begins:
1
3, 3
7, 6, 7
13, 13, 13, 13
21, 26, 26, 26, 21
31, 47, 52, 52, 47, 31
43, 78, 99, 104, 99, 78, 43
57, 121, 177, 203, 203, 177, 121, 57
73, 178, 298, 380, 406, 380, 298, 178, 73
...
		

Crossrefs

Row sums are A027178.

Programs

  • Maple
    d:=[seq(n*(n+1)+1,n=0..14)];
    f:=proc(d) local T,M,n,i;
    M:=nops(d);
    T:=Array(0..M-1,0..M-1);
    for n from 0 to M-1 do T[n,0]:=d[n+1]; T[n,n]:=d[n+1]; od:
    for n from 2 to M-1 do
    for i from 1 to n-1 do T[n,i]:=T[n-1,i-1]+T[n-1,i]; od: od:
    lprint("triangle:");
    for n from 0 to M-1 do lprint(seq(T[n,i],i=0..n)); od:
    lprint("row sums:");
    lprint([seq( add(T[i,j],j=0..i), i=0..M-1)]);
    end;
    f(d);
  • Mathematica
    t[n_, n_] := n^2+n+1; t[n_, 0] := n^2+n+1; t[n_, k_] := t[n, k] = t[n-1, k-1] + t[n-1, k]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 14 2014 *)

A222404 Triangle read by rows: left and right edges are A002378, interior entries are filled in using the Pascal triangle rule.

Original entry on oeis.org

0, 2, 2, 6, 4, 6, 12, 10, 10, 12, 20, 22, 20, 22, 20, 30, 42, 42, 42, 42, 30, 42, 72, 84, 84, 84, 72, 42, 56, 114, 156, 168, 168, 156, 114, 56, 72, 170, 270, 324, 336, 324, 270, 170, 72, 90, 242, 440, 594, 660, 660, 594, 440, 242, 90, 110, 332, 682, 1034, 1254, 1320, 1254, 1034, 682, 332, 110
Offset: 0

Views

Author

N. J. A. Sloane, Feb 18 2013

Keywords

Examples

			Triangle begins:
0
2, 2
6, 4, 6
12, 10, 10, 12
20, 22, 20, 22, 20
30, 42, 42, 42, 42, 30
42, 72, 84, 84, 84, 72, 42
56, 114, 156, 168, 168, 156, 114, 56
...
		

Crossrefs

Row sums are 4*A000295.

Programs

  • Maple
    d:=[seq(n*(n+1),n=0..14)];
    f:=proc(d) local T,M,n,i;
    M:=nops(d);
    T:=Array(0..M-1,0..M-1);
    for n from 0 to M-1 do T[n,0]:=d[n+1]; T[n,n]:=d[n+1]; od:
    for n from 2 to M-1 do
    for i from 1 to n-1 do T[n,i]:=T[n-1,i-1]+T[n-1,i]; od: od:
    lprint("triangle:");
    for n from 0 to M-1 do lprint(seq(T[n,i],i=0..n)); od:
    lprint("row sums:");
    lprint([seq( add(T[i,j],j=0..i), i=0..M-1)]);
    end;
    f(d);
  • Mathematica
    t[n_, n_] := n*(n+1); t[n_, 0] := n*(n+1); t[n_, k_] := t[n, k] = t[n-1, k-1] + t[n-1, k]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 20 2014 *)

A134634 Triangle formed by Pascal's rule with borders = A000108.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 5, 4, 4, 5, 14, 9, 8, 9, 14, 42, 23, 17, 17, 23, 42, 132, 65, 40, 34, 40, 65, 132, 429, 197, 105, 74, 74, 105, 197, 429, 1430, 626, 302, 179, 148, 179, 302, 626, 1430, 4862, 2056, 928, 481, 327, 327, 481, 928, 2056, 4862, 16796, 6918, 2984, 1409, 808, 654, 808, 1409, 2984, 6918, 16796, 58786, 23714, 9902, 4393, 2217, 1462, 1462, 2217, 4393, 9902, 23714, 58786
Offset: 0

Views

Author

Gary W. Adamson, Nov 04 2007

Keywords

Comments

Row sums = A134635: (1, 2, 6, 18, 54, 164, ...).

Examples

			First few rows of the triangle:
    1;
    1,  1;
    2,  2,  2;
    5,  4,  4,  5;
   14,  9,  8,  9, 14;
   42, 23, 17, 17, 23, 42;
  132, 65, 40, 34, 40, 65, 132;
  ...
		

Crossrefs

Formula

Triangle, given right and left borders consist of the Catalan sequence, A000108; then T(n,k) = T(n-1,k) + T(n-1,k-1).

Extensions

Recomputed by N. J. A. Sloane, Feb 18 2013
Showing 1-4 of 4 results.