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

A081495 Start with Pascal's triangle; form a rhombus by sliding down n steps from top on both sides then sliding down inwards to complete the rhombus and then deleting the inner numbers; a(n) = sum of entries on perimeter of rhombus.

Original entry on oeis.org

1, 5, 17, 55, 189, 681, 2519, 9451, 35765, 136153, 520695, 1998745, 7696467, 29716025, 115000947, 445962899, 1732525861, 6741529113, 26270128535, 102501265057, 400411345659, 1565841089321, 6129331763923, 24014172955545, 94163002754699, 369507926510401
Offset: 1

Views

Author

Amarnath Murthy, Mar 25 2003

Keywords

Examples

			The rhombus pertaining to n = 4 is obtained from the solid rhombus
.....1
...1...1
.1...2...1
1..3...3...1
..4..6...4
...10..10
.....20
giving
.....1
...1...1
.1.......1
1..........1
..4......4
...10..10
.....20
and the sum of all the numbers is 55, a(4) = 55.
		

Crossrefs

Programs

  • GAP
    B:=Binomial;; Concatenation([1], List([2..25], n-> B(2*n, n)-B(2*(n-1), n-1) +2*n -3)); # G. C. Greubel, Aug 13 2019
  • Magma
    C:=Catalan; [1] cat [(n+1)*C(n) -n*C(n-1) +2*n-3: n in [2..25]]; // G. C. Greubel, Aug 13 2019
    
  • Maple
    seq(coeff(series(((1-x)^3 - (1-2*x-x^3)*sqrt(1-4*x))/((1-x)^2*sqrt(1-4*x) ), x, n+1), x, n), n = 1..25); # G. C. Greubel, Aug 13 2019
  • Mathematica
    With[{C = CatalanNumber}, Table[If[n==1, 1, (n+1)*C[n] -n*C[n-1] +2*n-3], {n, 25}]] (* G. C. Greubel, Aug 13 2019 *)
  • PARI
    vector(25, n, b=binomial; if(n==1,1,b(2*n, n)-b(2*(n-1), n-1) +2*n -3)) \\ G. C. Greubel, Aug 13 2019
    
  • Sage
    b=binomial; [1]+[b(2*n, n)-b(2*(n-1), n-1) +2*n -3 for n in (2..25)] # G. C. Greubel, Aug 13 2019
    

Formula

a(0)=1 for n>0 a(n)=binomial(2*n, n)-binomial(2*n-2, n-1)+2*n-3. - Benoit Cloitre, Sep 10 2003
G.f.: ((1-x)^3 - (1-2*x-x^3)*sqrt(1-4*x))/((1-x)^2*sqrt(1-4*x)). - G. C. Greubel, Aug 13 2019

Extensions

More terms from Benoit Cloitre, Sep 10 2003

A081496 Start with Pascal's triangle; a(n) is the sum of the numbers on the periphery of the n-th central rhombus containing exactly 4 numbers.

Original entry on oeis.org

5, 14, 46, 160, 574, 2100, 7788, 29172, 110110, 418132, 1595620, 6113744, 23505356, 90633800, 350351640, 1357278300, 5268292830, 20483876820, 79765662900, 311038321440, 1214362277700, 4746455801880, 18570960418920, 72728638093800
Offset: 1

Views

Author

Amarnath Murthy, Mar 25 2003

Keywords

Examples

			The first three rhombuses are
...1...........2.........6
.1...1.......3...3.....10..10
...2......,....6.....,...20
and the corresponding sums are a(1) =5, a(2) =14 and a(3) =46.
		

Crossrefs

Programs

  • Maple
    seq((9*n-4)*binomial(2*(n-1),(n-1))/n,n=1..26); # C. Ronaldo, Dec 20 2004
  • PARI
    { A029635(n, k) = if( k<0 || k>n, 0, (n==0) + binomial(n, k) + binomial(n-1, k-1))}; \\ program from Michael Somos in A029635
    {a(n) = sum(k=0,n,A029635(n, k)^2)} \\ Paul D. Hanna, Oct 17 2017
    for(n=1,30,print1(a(n),", "))

Formula

a(n) = (9*n-4)*Catalan(n-1) = (9*n-4)*binomial(2*(n-1), (n-1))/n. - C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 20 2004
a(n) = Sum_{k=0..n} A029635(n,k)^2 for n>=1, where A029635 is the Lucas triangle. - Paul D. Hanna, Oct 17 2017

Extensions

More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Dec 20 2004

A028270 Central elements in 3-Pascal triangle A028262 (by row).

Original entry on oeis.org

1, 3, 8, 26, 90, 322, 1176, 4356, 16302, 61490, 233376, 890188, 3409588, 13104756, 50517200, 195234120, 756197910, 2934686610, 11408741520, 44420399100, 173191792620, 676104403260, 2642356838160, 10337529691320, 40481034410700
Offset: 0

Views

Author

Keywords

Comments

Or, start with Pascal's triangle; a(n) is the sum of the numbers on the periphery of the n-th central triangle containing exactly 3 numbers. The first three triangles are
...1...........2.........6
.1...1.......3...3.....10..10
and the corresponding sums are 3, 8 and 26. - Amarnath Murthy, Mar 25 2003
This sequence starting at a(n+2) has Hankel transform A000032(2n+1)*2^n (empirical observation). - Tony Foster III, May 20 2016

Crossrefs

Programs

  • Maple
    seq(binomial(2*n,n)+binomial(2*n-2,n-1),n=0..24);
    seq(2*binomial(2*n-1,n-1)+binomial(2*n-2,n-1),n=1..24);

Formula

G.f.: (x+1)/sqrt(1-4*x). - Vladeta Jovovic, Jan 08 2004
a(n) = binomial(2n, n)+binomial(2n-2, n-1)=A000984(n)+A000984(n-1). - Emeric Deutsch, Apr 20 2004
a(n) = 2binomial(2n-1, n-1)+binomial(2n-2, n-1). - Emeric Deutsch, Apr 20 2004
a(n) = (n+1)*C(n) + n*C(n-1), C = Catalan number (A000108). - Gary W. Adamson, Dec 28 2007
G.f.: G(0) where G(k)= 1 + x/(1 - (4*k+2)/((4*k+2) + (k+1)/G(k+1))); (continued fraction, 3rd kind, 3-step). - Sergei N. Gladkovskii, Jul 24 2012
D-finite with recurrence n*a(n) -3*n*a(n-1) +2*(-2*n+5)*a(n-2)=0. - R. J. Mathar, May 01 2024

Extensions

More terms from James Sellers
Showing 1-4 of 4 results.