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-10 of 12 results. Next

A009628 Expansion of e.g.f.: sinh(x)/(1+x).

Original entry on oeis.org

0, 1, -2, 7, -28, 141, -846, 5923, -47384, 426457, -4264570, 46910271, -562923252, 7318002277, -102452031878, 1536780478171, -24588487650736, 418004290062513, -7524077221125234, 142957467201379447, -2859149344027588940, 60042136224579367741
Offset: 0

Views

Author

Keywords

Comments

(-1)^n*(A000166 + A000522)/2 = A009179, (-1)^n*(A000166-A000522)/2 = this_sequence.

Crossrefs

Programs

  • Maple
    G(x):= sinh(x)/(1+x): f[0]:=G(x): for n from 1 to 21 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=0..20); # Zerinvary Lajos, Apr 03 2009
  • Mathematica
    a[n_] := (-1)^n (Exp[-1] Gamma[1 + n, -1] - Exp[1] Gamma[1 + n, 1])/2;
    Table[a[n], {n, 0, 20}] (* Peter Luschny, Dec 18 2017 *)
    With[{nn=30},CoefficientList[Series[Sinh[x]/(1+x),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Mar 19 2023 *)
  • PARI
    a(n) = n!*polcoeff((sinh(x)/(1+x) + x * O(x^n)), n) \\ Charles R Greathouse IV, Sep 09 2016
    
  • PARI
    x='x+O('x^99); concat([0], Vec(serlaplace(sinh(x)/(1+x)))) \\ Altug Alkan, Dec 18 2017
    
  • Ruby
    def A009628(n)
      a = 0
      (0..n).map{|i| a = -i * a + i % 2}
    end # Seiichi Manyama, Sep 09 2016

Formula

a(n) = (-1)^(n+1)*floor(n!*sinh(1)), n>=1. - Vladeta Jovovic, Aug 10 2002
Let u(1) = 1, u(n) = n*u(n-1) + n (mod 2); then for n>0, a(n) = (-1)^(n+1)*u(n). - Benoit Cloitre, Jan 12 2003
Unsigned sequence satisfies a(n) = n*a(n-1)+a(n-2)-(n-2)*a(n-3), with E.g.f. sinh(z)/(1-z). - Mario Catalani (mario.catalani(AT)unito.it), Feb 08 2003
a(n) = (-1)^(n+1) * n! * Sum_{k=1..floor((n+1)/2)} 1/(2*k-1)!.
a(n) = -n*a(n-1) + n (mod 2). - Seiichi Manyama, Sep 09 2016
a(n) = (-1)^n*(exp(-1)*Gamma(1+n,-1) - exp(1)*Gamma(1+n,1))/2. - Peter Luschny, Dec 18 2017

Extensions

Extended with signs by Olivier Gérard, Mar 15 1997
Definition clarified by Harvey P. Dale, Mar 19 2023

A051397 a(n) = (2*n-2)*(2*n-1)*a(n-1)+1.

Original entry on oeis.org

0, 1, 7, 141, 5923, 426457, 46910271, 7318002277, 1536780478171, 418004290062513, 142957467201379447, 60042136224579367741, 30381320929637160076947, 18228792557782296046168201, 12796612375563171824410077103, 10390849248957295521420982607637
Offset: 0

Views

Author

Keywords

Crossrefs

Bisection of abs(A009628). Also bisection of A087208 and of A186763. Cf. A073742, A074790, A275651.

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,(2(n+1)-2)(2(n+1)-1)a+1}; Transpose[NestList[nxt,{0,0},20]][[2]] (* Harvey P. Dale, Jun 13 2016 *)

Formula

a(n) = Sum_{k=0..n-1} (2*n-1)!/(2*k+1)!. a(n) = floor((2*n-1)!*sinh(1)). - Vladeta Jovovic, Aug 10 2002
Conjecture: a(n) +(-4*n^2+6*n-3)*a(n-1) +2*(2*n-3)*(n-2)*a(n-2)=0. - R. J. Mathar, Jan 31 2014
From Peter Bala, Sep 02 2016: (Start)
G.f. sinh(x)/(1 - x^2) = x + 7*x^3/3! + 141*x^5/5! + 5923*x^7/7! + ....
Mathar's conjectured recurrence a(n) = (4*n^2 - 6*n + 3)*a(n-1) - (2*n - 3)*(2*n - 4)*a(n-2) follows easily from the defining recurrence. The sequence b(n) := (2*n - 1)! also satisfies Mathar's recurrence but with b(1) = 1, b(2) = 6. This leads to the continued fraction representation a(n) = (2*n - 1)!*(1 + 1/(6 - 6/(21 - 20/(43 - ... - (2*n - 3)*(2*n - 4)/(4*n^2 - 6*n + 3) )))) for n >= 3. Taking the limit gives the continued fraction representation sinh(1) = A073742 = 1 + 1/(6 - 6/(21 - 20/(43 - ... - (2*n - 3)*(2*n - 4)/((4*n^2 - 6*n + 3) - ... )))). (End)

A186761 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k increasing odd cycles (0<=k<=n). A cycle (b(1), b(2), ...) is said to be increasing if, when written with its smallest element in the first position, it satisfies b(1)

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 4, 0, 1, 9, 4, 10, 0, 1, 33, 56, 10, 20, 0, 1, 235, 218, 211, 20, 35, 0, 1, 1517, 1982, 833, 616, 35, 56, 0, 1, 12593, 14040, 9612, 2408, 1526, 56, 84, 0, 1, 111465, 134248, 72588, 35176, 5838, 3360, 84, 120, 0, 1, 1122819, 1305126, 797461, 276120, 107710, 12516, 6762, 120, 165, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, Feb 27 2011

Keywords

Comments

Sum of entries in row n is n!.
T(n,0) = A186762(n).
Sum_{k=0..n} k*T(n,k) = A186763(n).

Examples

			T(3,1)=4 because we have (1)(23), (12)(3), (13)(2), and (123).
T(4,1)=4 because we have (1)(243), (143)(2), (142)(3), and (132)(4).
Triangle starts:
   1;
   0,  1;
   1,  0,  1;
   1,  4,  0,  1;
   9,  4, 10,  0, 1;
  33, 56, 10, 20, 0, 1;
  ...
		

Crossrefs

Programs

  • Maple
    g := exp((t-1)*sinh(z))/(1-z): gser := simplify(series(g, z = 0, 13)): for n from 0 to 10 do P[n] := sort(expand(factorial(n)*coeff(gser, z, n))) end do: for n from 0 to 10 do seq(coeff(P[n], t, k), k = 0 .. n) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n) option remember; expand(`if`(n=0, 1, add(b(n-j)*(
          `if`(j::odd, x-1, 0)+(j-1)!)*binomial(n-1, j-1), j=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n)):
    seq(T(n), n=0..14);  # Alois P. Heinz, May 12 2017
  • Mathematica
    b[n_] := b[n] = Expand[If[n == 0, 1, Sum[b[n - j]*(If[OddQ[j], x - 1, 0] + (j - 1)!)*Binomial[n - 1, j - 1], {j, 1, n}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n]];
    Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Jun 05 2018, after Alois P. Heinz *)

Formula

E.g.f.: G(t,z) = exp((t-1)*sinh z)/(1-z).
The 5-variate e.g.f. H(x,y,u,v,z) of permutations with respect to size (marked by z), number of increasing odd cycles (marked by x), number of increasing even cycles (marked by y), number of nonincreasing odd cycles (marked by u), and number of nonincreasing even cycles (marked by v), is given by
H(x,y,u,v,z)=exp(((x-u)sinh z + (y-v)(cosh z - 1))*(1+z)^{(u-v)/2}/(1-z)^{(u+v)/2}.

A186762 Number of permutations of {1,2,...,n} having no increasing odd cycles. A cycle (b(1), b(2), ...) is said to be increasing if, when written with its smallest element in the first position, it satisfies b(1)

Original entry on oeis.org

1, 0, 1, 1, 9, 33, 235, 1517, 12593, 111465, 1122819, 12313409, 147949593, 1922353925, 26918452691, 403744456541, 6460109224801, 109820584161393, 1976779056442179, 37558742545087481, 751175283283221129, 15774677696321630525, 347042934659313999539, 7981987292809647817237
Offset: 0

Views

Author

Emeric Deutsch, Feb 27 2011

Keywords

Comments

a(n) = A186761(n,0).

Examples

			a(3)=1 because we have (132).
a(4)=9 because we have (12)(34), (13)(24), (14)(23), and the six cyclic permutations of {1,2,3,4}.
		

Crossrefs

Programs

  • Maple
    g := exp(-sinh(z))/(1-z): gser := series(g, z = 0, 27): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 23);
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*
         ((j-1)!-irem(j, 2))*binomial(n-1, j-1), j=1..n))
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, May 04 2023
  • Mathematica
    CoefficientList[Series[E^(-Sinh[x])/(1-x), {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Mar 16 2014 *)

Formula

E.g.f.: g(z) = exp(-sinh z)/(1-z).
a(n) ~ exp(-sinh(1)) * n! = 0.308756853522... * n!. - Vaclav Kotesovec, Mar 16 2014

A184958 Number of nonincreasing even cycles in all permutations of {1,2,...,n}. A cycle (b(1), b(2), ...) is said to be increasing if, when written with its smallest element in the first position, it satisfies b(1)

Original entry on oeis.org

0, 0, 0, 0, 5, 25, 269, 1883, 20103, 180927, 2172149, 23893639, 326640467, 4246326071, 65675585793, 985133786895, 17069814958319, 290186854291423, 5579050805341613, 106001965301490647, 2241684406438644939, 47075372535211543719
Offset: 0

Views

Author

Emeric Deutsch, Feb 27 2011

Keywords

Examples

			a(4) = 5 because the only permutations of {1,2,3,4} having nonincreasing even cycles are (1243), (1324), (1342), (1423), and (1432).
		

Crossrefs

Programs

  • Maple
    g := (1/2*(2*(1-cosh(z))-ln(1-z^2)))/(1-z): gser := series(g, z = 0, 27): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 21);
  • Mathematica
    With[{nn=30},CoefficientList[Series[1/2(2(1-Cosh[x])-Log[1-x^2])/(1-x), {x,0,nn}],x]Range[0,nn]!] (* Harvey P. Dale, Oct 22 2011 *)
    Table[(n! HarmonicNumber[n] - HypergeometricPFQ[{1, -n}, {}, -1] + (-1)^(n + 1) HypergeometricPFQ[{1, -n}, {}, 1] + n! (2 + (-1)^n LerchPhi[-1, 1, 1 + n] - Log[2]))/2, {n, 0, 20}] (* Benedict W. J. Irwin, May 30 2016 *)

Formula

a(n) = Sum_{k>=0} k*A186769(n,k).
E.g.f.: (1/2) * (2*(1-cosh(z)) - log(1-z^2))/(1-z).
a(n) ~ n!/2 * (log(n/2) - 1/exp(1) + 2 - exp(1) + gamma), where gamma is the Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Oct 05 2013
a(n) = (n!*H(n)-2F0(1,-n;;-1) + (-1)^(n+1)*2F0(1,-n;;1)+n!*(2+(-1)^n*LerchPhi(-1,1,n+1)-log(2)))/2, where H(n) is the n-th harmonic number. - Benedict W. J. Irwin, May 30 2016

A186767 Number of permutations of {1,2,...,n} having no nonincreasing odd cycles. A cycle (b(1), b(2), ...) is said to be increasing if, when written with its smallest element in the first position, it satisfies b(1)

Original entry on oeis.org

1, 1, 2, 5, 20, 77, 472, 2585, 21968, 157113, 1724064, 15229645, 204738624, 2151199429, 34194201472, 416221515169, 7631627843840, 105565890206193, 2192501224174080, 33962775502534165, 787900686999286784, 13509825183288167869
Offset: 0

Views

Author

Emeric Deutsch, Feb 27 2011

Keywords

Comments

a(n) = A186766(n,0).

Examples

			a(3)=5 because we have (1)(2)(3), (1)(23), (12)(3), (13)(2), and (123).
		

Crossrefs

Programs

  • Maple
    g := exp(sinh(z))/sqrt(1-z^2): gser := series(g, z = 0, 27): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 21);
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*
          binomial(n-1, j-1)*`if`(j::even, (j-1)!, 1), j=1..n))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Apr 13 2017
  • Mathematica
    a[n_] := a[n] = If[n==0, 1, Sum[a[n-j]*Binomial[n-1, j-1]*If[EvenQ[j], (j-1)!, 1], {j, 1, n}]];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, May 18 2017, after Alois P. Heinz *)

Formula

E.g.f.: g(z) = exp(sinh z)/sqrt(1-z^2).

A186768 Number of nonincreasing odd cycles in all permutations of {1,2,...,n}. A cycle (b(1), b(2), ...) is said to be increasing if, when written with its smallest element in the first position, it satisfies b(1)

Original entry on oeis.org

0, 0, 0, 1, 4, 43, 258, 2525, 20200, 222119, 2221190, 28061889, 336742668, 4856656283, 67993187962, 1107076110629, 17713217770064, 322047491979087, 5796854855623566, 116542615962575753, 2330852319251515060, 51380800712458456259
Offset: 0

Views

Author

Emeric Deutsch, Feb 27 2011

Keywords

Comments

a(n) = Sum(k*A186766(n,k), k>=0).

Examples

			a(3)=1 because in (1)(2)(3), (1)(23), (12)(3), (13)(2), (123), and (132) we have a total of 0+0+0+0+0+1 =1 increasing odd cycles.
		

Crossrefs

Programs

  • Maple
    g := ((ln((1+z)/(1-z))-2*sinh(z))*1/2)/(1-z): gser := series(g, z = 0, 27): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 21);
  • Mathematica
    CoefficientList[Series[(Log[(1+x)/(1-x)]-2*Sinh[x])/(2*(1-x)), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 07 2013 *)

Formula

E.g.f.: g(z)=[log((1+z)/(1-z))-2sinh(z)]/(2(1-z)).
a(n) ~ n!/2 * (log(2*n) + gamma - exp(1) + exp(-1)), where gamma is the Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Oct 07 2013

Extensions

Typo in e.g.f. corrected by Vaclav Kotesovec, Oct 07 2013

A296727 Expansion of e.g.f. arcsinh(x)/(1 - x).

Original entry on oeis.org

0, 1, 2, 5, 20, 109, 654, 4353, 34824, 324441, 3244410, 34795485, 417545820, 5536151685, 77506123590, 1144330385625, 18309286170000, 315366695240625, 5676600514331250, 106667957800963125, 2133359156019262500, 45229212438054868125, 995042673637207098750, 22696937952367956440625
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 19 2017

Keywords

Examples

			arcsinh(x)/(1 - x) = x/1! + 2*x^2/2! + 5*x^3/3! + 20*x^4/4! + 109*x^5/5! + ...
		

Crossrefs

Programs

  • Maple
    a:=series(arcsinh(x)/(1 - x),x=0,24): seq(n!*coeff(a,x,n),n=0..23); # Paolo P. Lava, Mar 27 2019
  • Mathematica
    nmax = 23; CoefficientList[Series[ArcSinh[x]/(1 - x), {x, 0, nmax}], x] Range[0, nmax]!
    nmax = 23; CoefficientList[Series[Log[x + Sqrt[1 + x^2]]/(1 - x), {x, 0, nmax}], x] Range[0, nmax]!
  • PARI
    first(n) = x='x+O('x^n); Vec(serlaplace(asinh(x)/(1 - x)), -n) \\ Iain Fox, Dec 19 2017

Formula

E.g.f.: log(x + sqrt(1 + x^2))/(1 - x).
a(n) ~ n! * log(1 + sqrt(2)). - Vaclav Kotesovec, Dec 20 2017

A306150 Row sums of A306015.

Original entry on oeis.org

0, 2, 4, 14, 56, 282, 1692, 11846, 94768, 852914, 8529140, 93820542, 1125846504, 14636004554, 204904063756, 3073560956342, 49176975301472, 836008580125026, 15048154442250468, 285914934402758894, 5718298688055177880, 120084272449158735482, 2641853993881492180604
Offset: 0

Views

Author

Peter Luschny, Jun 23 2018

Keywords

Comments

a(n) is the number of nonderangements of size n in which each fixed point is colored red or blue. For example, with n = 3, the derangements are 231 and 312 and they don't count, the permutations 132, 321, 213 each have 1 fixed point and hence 2 colorings, and the identity 123 with 3 fixed points has 8 colorings, yielding a(3) = 3*2 + 8 = 14 colorings altogether. - David Callan, Dec 19 2021

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:= [0] cat Coefficients(R!(2*Sinh(x)/(1-x))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Jul 18 2018
  • Maple
    egf := 2*sinh(x)/(1-x): ser := series(egf,x,24):
    seq(n!*coeff(ser,x,n), n=0..22);
  • Mathematica
    Table[Exp[1] Gamma[n+1, 1] - Subfactorial[n], {n, 0, 22}]
    With[{nmax = 50}, CoefficientList[Series[2*Sinh[x]/(1 - x), {x, 0, nmax}], x]*Range[0, nmax]!] (* G. C. Greubel, Jul 18 2018 *)
  • PARI
    x='x+O('x^30); concat([0], Vec(serlaplace(2*sinh(x)/(1 - x)))) \\ G. C. Greubel, Jul 18 2018
    
  • Sage
    @cached_function
    def a(n):
        if n<3: return 2*n
        return n*a(n-1)+a(n-2)-(n-2)*a(n-3)
    [a(n) for n in (0..22)]
    

Formula

a(n) = e * Gamma(n + 1, 1) - !(n).
a(n) = Gamma(n + 1, 1) * e - Gamma(n + 1, -1) / e.
a(n) = n*a(n-1) + a(n-2) - (n-2)*a(n-3) for n >= 3.
a(n) = n! [x^n] 2*sinh(x)/(1-x).
a(n) = 2*A186763(n) = (-1)^(n+1)*2*A009628(n) = A000522(n) - A000166(n).

A195326 Numerators of fractions leading to e - 1/e (A174548).

Original entry on oeis.org

0, 2, 2, 7, 7, 47, 47, 5923, 5923, 426457, 426457, 15636757, 15636757, 7318002277, 7318002277, 1536780478171, 1536780478171, 603180793741, 603180793741, 142957467201379447, 142957467201379447
Offset: 0

Views

Author

Paul Curtz, Oct 12 2011

Keywords

Comments

The sequence of approximations of exp(1) obtained by truncating the Taylor series of exp(x) after n terms is A061354(n)/A061355(n) = 1, 2, 5/2, 8/3, 65/24, ...
A Taylor series of exp(-1) is 1, 0, 1/2, 1/3, 3/8, ... and (apart from the first 2 terms) given by A000255(n)/A001048(n). Subtracting both sequences term by term we obtain a series for exp(1) - exp(-1) = 0, 2, 2, 7/3, 7/3, 47/20, 47/20, 5923/2520, 5923/2520, 426457/181440, 426457/181440, ... which defines the numerators here.
Each second of the denominators (that is 3, 2520, 19958400, ...) is found in A085990 (where each third term, that is 60, 19958400, ...) is to be omitted.
This numerator sequence here is basically obtained by doubling entries of A051397, A009628, A087208, or A186763, caused by the standard associations between cosh(x), sinh(x) and exp(x).

Examples

			a(0) =  1  -  1;
a(1) =  2  -  0;
a(2) = 5/2 - 1/2.
		

Crossrefs

Programs

  • Maple
    taylExp1 := proc(n)
            add(1/j!,j=0..n) ;
    end proc:
    A000255 := proc(n)
            if n <=1 then
                    1;
            else
                    n*procname(n-1)+(n-1)*procname(n-2) ;
            end if;
    end proc:
    A001048 := proc(n)
            n!+(n-1)! ;
    end proc:
    A195326 := proc(n)
            if n = 0 then
                    0;
            elif n =1 then
                    2;
            else
                    taylExp1(n) -A000255(n-2)/A001048(n-1);
            end if;
              numer(%);
    end proc:
    seq(A195326(n),n=0..20) ; # R. J. Mathar, Oct 14 2011

Extensions

Material meant to be placed in other sequences removed by R. J. Mathar, Oct 14 2011
Showing 1-10 of 12 results. Next