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

A059348 Third diagonal of array in A059347.

Original entry on oeis.org

2, 2, 3, 4, 7, 10, 19, 28, 56, 84, 174, 264, 561, 858, 1859, 2860, 6292, 9724, 21658, 33592, 75582, 117572, 266798, 416024, 950912, 1485800, 3417340, 5348880, 12369285, 19389690, 45052515, 70715340, 165002460, 259289580, 607283490
Offset: 2

Views

Author

N. J. A. Sloane, Jan 27 2001

Keywords

Comments

Same as A104722 except for leading term (both have rational g.f.s). - R. J. Mathar and Franklin T. Adams-Watters, May 19 2008

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[1 + ( (1 + x)*(1 - Sqrt[1 - 4*x^2])/(2*x^2))^2, {x, 0, 50}], x] (* G. C. Greubel, Jan 08 2017 *)
  • PARI
    Vec( 1 + ( (1 + x)*(1 - sqrt(1 - 4*x^2))/(2*x^2))^2 + O(x^25)) \\ G. C. Greubel, Jan 08 2017

Formula

G.f.: 1 + ( (1 + x)*(1 - sqrt(1 - 4*x^2))/(2*x^2))^2. - G. C. Greubel, Jan 08 2017
a(n) ~ (9 + (-1)^n) * 2^(n - 3/2) / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Aug 31 2025

A256644 Numbers of alternating permutations where numbers at odd positions and even positions are monotone respectively.

Original entry on oeis.org

1, 1, 1, 2, 5, 6, 9, 12, 21, 30, 58, 86, 176, 266, 563, 860, 1861, 2862, 6294, 9726, 21660, 33594, 75584, 117574, 266800, 416026, 950914, 1485802, 3417342, 5348882, 12369287, 19389692, 45052517, 70715342, 165002462, 259289582, 607283492, 955277402, 2244901892
Offset: 0

Views

Author

Ran Pan, Apr 07 2015

Keywords

Examples

			a(5) = 6: (1,3,2,5,4), (1,4,2,5,3), (1,5,2,4,3), (3,4,2,5,1), (3,5,2,4,1), (4,5,2,3,1).
a(6) = 9: (1,3,2,5,4,6), (1,4,2,5,3,6), (1,6,2,5,3,4), (3,4,2,5,1,6), (3,6,2,5,1,4), (4,6,2,5,1,3), (4,6,3,5,1,2), (5,6,2,4,1,3), (5,6,3,4,1,2).
		

Crossrefs

Programs

  • Magma
    [1,1,1,2] cat [Catalan(Floor(n/2))+ Catalan(Floor((n-1)/2))+2: n in [4..40]]; // Vincenzo Librandi, Apr 08 2015
  • Maple
    C:= n-> binomial(2*n, n)/(n+1):
    a:= n-> `if`(n<4, [1$3, 2][n+1], C(iquo(n, 2))+C(iquo(n-1, 2))+2):
    seq(a(n), n=0..40);  # Alois P. Heinz, Apr 08 2015
  • Mathematica
    Table[Which[n < 3, 1, n == 3, 2, True, CatalanNumber[Floor[n/2]] + CatalanNumber[Floor[(n - 1)/2]] + 2], {n, 0, 38}] (* Michael De Vlieger, Apr 07 2015 *)
  • PARI
    C(n) = binomial(2*n, n)/(n+1);
    a(n) = if (n<3, 1, if (n==3, 2, C(n\2)+ C((n-1)\2)+2)); \\ Michel Marcus, Apr 07 2015
    
  • PARI
    a(n) = if (n<4, return(max(1,n-1))); binomial(n\2*2, n\2)/(n\2+1)*if(n%2, 2, (5*n-2)/(4*n-4)) + 2 \\ Charles R Greathouse IV, Apr 07 2015
    

Formula

For n>3, a(n) = C(floor(n/2))+ C(floor((n-1)/2))+2, where C(n) is the n-th Catalan number, with a(0)=a(1)=a(2)=1 and a(3)=2.
Showing 1-2 of 2 results.