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.

A262034 Number of permutations of [n] beginning with at least ceiling(n/2) ascents.

Original entry on oeis.org

1, 0, 1, 1, 4, 5, 30, 42, 336, 504, 5040, 7920, 95040, 154440, 2162160, 3603600, 57657600, 98017920, 1764322560, 3047466240, 60949324800, 106661318400, 2346549004800, 4151586700800, 99638080819200, 177925144320000, 4626053752320000, 8326896754176000
Offset: 0

Views

Author

Alois P. Heinz, Sep 08 2015

Keywords

Examples

			a(4) = 4: 1234, 1243, 1342, 2341.
a(5) = 5: 12345, 12354, 12453, 13452, 23451.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, [1, 0, 1$2][n+1],
          2*((n^2-1)*a(n-2)-a(n-1))/(n+3))
        end:
    seq(a(n), n=0..30);
  • Mathematica
    np=Rest[With[{nn=30},CoefficientList[Series[(Exp[x^2](x+1)-x^4/2+x^2+x+1)/ x^3,{x,0,nn}],x] Range[0,nn]!]//Quiet];Join[{1},np] (* Harvey P. Dale, May 18 2019 *)

Formula

E.g.f.: (exp(x^2)*(x+1)-(x^4/2+x^2+x+1))/x^3.
a(n) = 2*((n^2-1)*a(n-2)-a(n-1))/(n+3) for n>3, a(0)=a(2)=a(3)=1, a(1)=0.
a(n) = n!/(n/2+1)! if n even, a(n) = floor(C(n+1,(n+1)/2)/(n+3)*((n-1)/2)!) if n odd.
a(2n) = A262033(2n) = A001761(n).
a(2n+1) = A102693(n+1).
Sum_{n>=2} 1/a(n) = (39*exp(1/4)*sqrt(Pi)*erf(1/2) - 6)/16, where erf is the error function. - Amiram Eldar, Dec 04 2022

A262035 Number of permutations of [2n+1] beginning with exactly n ascents.

Original entry on oeis.org

1, 2, 15, 168, 2520, 47520, 1081080, 28828800, 882161280, 30474662400, 1173274502400, 49819040409600, 2313026876160000, 116576554558464000, 6338850154116480000, 369890550169620480000, 23056510960573009920000, 1529010726859052236800000
Offset: 0

Views

Author

Alois P. Heinz, Sep 08 2015

Keywords

Examples

			a(0) = 1: 1.
a(1) = 2: 132, 231.
a(2) = 15: 12435, 12534, 12543, 13425, 13524, 13542, 14523, 14532, 23415, 23514, 23541, 24513, 24531, 34512, 34521.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n+1,
          2*(n+1)*(2*n+1)*a(n-1)/(n+2))
        end:
    seq(a(n), n=0..20);

Formula

E.g.f.: (1-2*x)/(4*sqrt(1-4*x)*x^2)+(2*x^2-1)/(4*x^2).
a(n) = 2*(n+1)*(2*n+1)*a(n-1)/(n+2) for n>1, a(n) = n+1 for n<=1.
a(n) = (2*n+1)!/(n+1)! - floor((2*n+2)!/((n+1)!*(n+1)*(n+2)*2)).
a(n) = A262033(2n+1) - A262034(2n+1).

A329964 a(n) = (n!/floor(1+n/2)!)^2.

Original entry on oeis.org

1, 1, 1, 9, 16, 400, 900, 44100, 112896, 9144576, 25401600, 3073593600, 9032601600, 1526509670400, 4674935865600, 1051860569760000, 3324398837760000, 960751264112640000, 3112834095724953600, 1123733108556708249600, 3714820193575895040000
Offset: 0

Views

Author

Peter Luschny, Dec 04 2019

Keywords

Crossrefs

Cf. A262033.

Programs

  • Maple
    A329964 := n -> (n!/floor(1+n/2)!)^2:
    seq(A329964(n), n=0..20);
  • Mathematica
    a[n_] := (n!/Floor[1 + n/2]!)^2; Array[a, 20, 0] (* Amiram Eldar, Dec 04 2022 *)

Formula

a(n) = A262033(n)^2.
Sum_{n>=0} 1/a(n) = 29/16 + (3/16)*Pi*StruveL(-1, 1/2) + (57/64)*Pi*StruveL(0, 1/2) + (1/4)*Pi*StruveL(1, 1/2), where StruveL is the modified Struve function. - Amiram Eldar, Dec 04 2022

A329965 a(n) = ((1+n)*floor(1+n/2))*(n!/floor(1+n/2)!)^2.

Original entry on oeis.org

1, 2, 6, 72, 240, 7200, 25200, 1411200, 5080320, 457228800, 1676505600, 221298739200, 821966745600, 149597947699200, 560992303872000, 134638152929280000, 508633022177280000, 155641704786247680000, 591438478187741184000, 224746621711341649920000
Offset: 0

Views

Author

Peter Luschny, Dec 04 2019

Keywords

Crossrefs

Programs

  • Maple
    A329965 := n -> ((1+n)*floor(1+n/2))*(n!/floor(1+n/2)!)^2:
    seq(A329965(n), n=0..19);
  • Mathematica
    ser := Series[(1 - Sqrt[1 - 4 x^2] - 4 x^2 (1 - x - Sqrt[1 - 4 x^2]))/(2 x^2 (1 - 4 x^2)^(3/2)), {x, 0, 22}]; Table[n! Coefficient[ser, x, n], {n, 0, 20}]
    Table[(1+n)Floor[1+n/2](n!/Floor[1+n/2]!)^2,{n,0,30}] (* Harvey P. Dale, Oct 01 2023 *)
  • Python
    from fractions import Fraction
    def A329965():
        x, n = 1, Fraction(1)
        while True:
            yield int(x)
            m = n if n % 2 else 4/(n+2)
            n += 1
            x *= m * n
    a = A329965(); [next(a) for i in range(36)]

Formula

a(n) = n!*A212303(n+1).
a(n) = (n+1)!*A057977(n).
a(n) = A093005(n+1)*A262033(n)^2.
a(n) = A093005(n+1)*A329964(n).
a(2*n) = A052510(n) (n >= 0).
a(2*n+1) = A123072(n+1) (n >= 0).
a(n) = n! [x^n] (1 - sqrt(1 - 4*x^2) - 4*x^2*(1 - x - sqrt(1 - 4*x^2)))/(2*x^2*(1 - 4*x^2)^(3/2)).
Showing 1-4 of 4 results.