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.

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

A130103 Expansion of e.g.f. e^(2x)-(1+x)*e^x+x.

Original entry on oeis.org

0, 1, 1, 4, 11, 26, 57, 120, 247, 502, 1013, 2036, 4083, 8178, 16369, 32752, 65519, 131054, 262125, 524268, 1048555, 2097130, 4194281, 8388584, 16777191, 33554406, 67108837, 134217700, 268435427, 536870882, 1073741793, 2147483616
Offset: 0

Views

Author

Paul Barry, May 07 2007

Keywords

Comments

Partial sums are A130104.
Essentially the same as the Euler numbers A000295.
Number of binary strings of length n where 0 is not used or is used at least twice and 1 is used at least once. For example, for n=3 the strings are 100, 010, 001, 111. - Enrique Navarrete, Feb 06 2025
Also the number of ordered set partitions of an n-set into 2 sets such that the first set cannot have a single element and the second set has at least one element. For example, for n=3 the ordered set partitions are: { },{1,2,3}; {1,2},{3}; {1,3},{2}; {2,3},{1}. - Enrique Navarrete, Feb 14 2025

Examples

			G.f. = x + x^2 + 4*x^3 + 11*x^4 + 26*x^5 + 57*x^6 + 120*x^7 + 247*x^8 + ...
		

Crossrefs

Cf. A000295.

Programs

  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=2*a[n-1]+n od: seq(a[n], n=0..30); # Zerinvary Lajos, Feb 22 2008
  • Mathematica
    Join[{0,1},LinearRecurrence[{4,-5,2},{1,4,11},40]] (* Harvey P. Dale, May 16 2014 *)
    a[ n_] := If[ n < 2, Boole[n == 1], 2^n - (1 + n)]; (* Michael Somos, Aug 17 2015 *)
  • PARI
    {a(n) = if( n<2, n==1, 2^n - (1+n))}; /* Michael Somos, Aug 17 2015 */

Formula

G.f.: x(1-3x+5x^2-2x^3)/((1-x)^2*(1-2x)).
E.g.f.: e^(2x)-(1+x)*e^x+x.
a(n) = 2^n-n-1+C(1,n)-C(0,n).
a(n) = A130102(n+1)/2.
a(n) = Sum_{i=1..n} i*2^(n-i) - Ctibor O. Zizka, Feb 23 2008

A131103 Rectangular array read by antidiagonals: a(n, k) is the number of ways to put k labeled objects into n labeled boxes so that there are no boxes with exactly one object (n, k >= 1).

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 0, 3, 2, 1, 0, 4, 3, 8, 1, 0, 5, 4, 21, 22, 1, 0, 6, 5, 40, 63, 52, 1, 0, 7, 6, 65, 124, 243, 114, 1, 0, 8, 7, 96, 205, 664, 969, 240, 1, 0, 9, 8, 133, 306, 1405, 3196, 3657, 494, 1, 0, 10, 9, 176, 427, 2556, 7425, 15712, 12987, 1004, 1, 0, 11, 10, 225, 568, 4207
Offset: 1

Views

Author

David Wasserman, Jun 14 2007, Jun 15 2007

Keywords

Comments

Problem suggested by Brandon Zeidler. Columns four and five are A000567 and A051874. Second row is A130102.

Examples

			Array begins:
0 1 1 1 1 1 1
0 2 2 8 22 52 114
0 3 3 21 63 243 969
		

Crossrefs

Formula

a(n, k) = sum_{j=1..min(floor(k/2), n)} A008299(k, j)*n!/(n-j)!.

A209528 The number of length n ternary sequences in which no symbol appears exactly once.

Original entry on oeis.org

1, 0, 3, 3, 21, 63, 243, 969, 3657, 12987, 43959, 143685, 458109, 1435047, 4439451, 13612257, 41474577, 125798643, 380343519, 1147320285, 3455328261, 10394294175, 31242648963, 93853773369, 281825558361, 846030320043, 2539248584583, 7620161669109
Offset: 0

Views

Author

Geoffrey Critzer, Mar 20 2012

Keywords

Examples

			a(2)=3 because we have (letting our alphabet be {0,1,2}) three length two sequences: (0,0), (1,1), (2,2).
a(3)=3 because we have: (0,0,0), (1,1,1), (2,2,2).
		

Crossrefs

Cf. A130102.

Programs

  • Mathematica
    nn=20; a=Exp[x]-x; Range[0,nn]! CoefficientList[Series[a^3, {x,0,nn}], x]
    LinearRecurrence[{10,-40,82,-91,52,-12},{1,0,3,3,21,63,243,969,3657,12987},30] (* Harvey P. Dale, Aug 20 2015 *)
  • PARI
    Vec(-(72*x^9 -312*x^8 +546*x^7 -492*x^6 +325*x^5 -202*x^4 +109*x^3 -43*x^2 +10*x -1) / ((x -1)^3*(2*x -1)^2*(3*x -1)) + O(x^100)) \\ Colin Barker, Nov 30 2014

Formula

E.g.f.: (exp(x)-x)^3.
For n>3: a(n) = 3^n - 3*n*2^(n-1) + 3*n*(n-1).
G.f.: -(72*x^9 -312*x^8 +546*x^7 -492*x^6 +325*x^5 -202*x^4 +109*x^3 -43*x^2 +10*x -1) / ((x -1)^3*(2*x -1)^2*(3*x -1)). - Colin Barker, Nov 30 2014

A379932 E.g.f. A(x) satisfies A(x) = ( exp(-x) + x*A(x) )^2.

Original entry on oeis.org

1, 0, 2, 10, 88, 978, 13468, 221338, 4233584, 92458018, 2271283684, 62012911530, 1863436238728, 61124896911154, 2173660174175228, 83304031307483962, 3423089366607304672, 150143469737701318722, 7001969736087834197716, 345972733119776006045386
Offset: 0

Views

Author

Seiichi Manyama, Jan 06 2025

Keywords

Crossrefs

Programs

  • PARI
    my(N=20, x='x+O('x^N)); Vec(serlaplace(4*exp(-2*x)/(1+sqrt(1-4*x*exp(-x)))^2))
    
  • PARI
    a(n) = -2*n!*sum(k=0, n, (-k-2)^(n-k-1)*binomial(2*k+1, k)/(n-k)!);

Formula

E.g.f.: B(x)^2, where B(x) is the e.g.f. of A379879.
a(n) = -2 * n! * Sum_{k=0..n} (-k-2)^(n-k-1) * binomial(2*k+1,k)/(n-k)!.
Showing 1-5 of 5 results.