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.

Previous Showing 11-20 of 24 results. Next

A288953 Number of relaxed compacted binary trees of right height at most one with minimal sequences between branch nodes except after the last branch node on level 0.

Original entry on oeis.org

1, 1, 3, 10, 51, 280, 1995, 15120, 138075, 1330560, 14812875, 172972800, 2271359475, 31135104000, 471038042475, 7410154752000, 126906349444875, 2252687044608000, 43078308695296875, 851515702861824000, 17984171447178811875, 391697223316439040000
Offset: 0

Views

Author

Michael Wallner, Jun 20 2017

Keywords

Comments

A relaxed compacted binary tree of size n is a directed acyclic graph consisting of a binary tree with n internal nodes, one leaf, and n pointers. It is constructed from a binary tree of size n, where the first leaf in a post-order traversal is kept and all other leaves are replaced by pointers. These links may point to any node that has already been visited by the post-order traversal. The right height is the maximal number of right-edges (or right children) on all paths from the root to any leaf after deleting all pointers. A branch node is a node with a left and right edge (no pointer). See the Genitrini et al. link. - Michael Wallner, Apr 20 2017
a(n) is the number of plane increasing trees with n+1 nodes where in the growth process induced by the labels maximal young leaves and non-maximal young leaves alternate except for a sequence of maximal young leaves at the beginning. A young leaf is a leaf with no left sibling. A maximal young leaf is a young leaf with maximal label. See the Wallner link. - Michael Wallner, Apr 20 2017

Examples

			Denote by L the leaf and by o nodes. Every node has exactly two out-going edges or pointers. Internal edges are denoted by - or |. Pointers are omitted and may point to any node further right. The root is at level 0 at the very left.
The general structure is
  L-o-o-o-o-o-o-o-o
          | | | | |
          o o o o o.
For n=0 the a(0)=1 solution is L.
For n=1 the a(1)=1 solution is L-o.
For n=2 the a(2)=3 solutions are
L-o-o     L-o
            |
            o
  2    +   1    solutions of this shape with pointers.
		

Crossrefs

Cf. A288954 (variation with additional initial sequence).
Cf. A177145 (variation without final sequence).
Cf. A001147 (relaxed compacted binary trees of right height at most one).
Cf. A082161 (relaxed compacted binary trees of unbounded right height).
Cf. A000032, A000246, A001879, A051577, A213527, A288950, A288952, A288954 (subclasses of relaxed compacted binary trees of right height at most one, see the Wallner link).
Cf. A000166, A000255, A000262, A052852, A123023, A130905, A176408, A201203 (variants of relaxed compacted binary trees of right height at most one, see the Wallner link).

Formula

E.g.f.: (2-z)/(3*(1-z)^2) + 1/(3*sqrt(1-z^2)).

A211871 Number T(n,k) of permutations of n elements with no fixed points and largest cycle of length k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 3, 0, 6, 0, 0, 0, 20, 0, 24, 0, 0, 15, 40, 90, 0, 120, 0, 0, 0, 210, 420, 504, 0, 720, 0, 0, 105, 1120, 2520, 2688, 3360, 0, 5040, 0, 0, 0, 4760, 15120, 27216, 20160, 25920, 0, 40320, 0, 0, 945, 25200, 126000, 193536, 226800, 172800, 226800, 0, 362880
Offset: 0

Views

Author

Alois P. Heinz, Feb 12 2013

Keywords

Comments

From Steven Finch, Sep 27 2021: (Start)
A permutation without fixed points is called a derangement.
For the statistic "length of the smallest cycle", see A348075. (End)

Examples

			T(0,0) = 1: (), the empty permutation.
T(2,2) = 1: (2,1).
T(3,3) = 2: (2,3,1), (3,1,2).
T(4,2) = 3: (2,1,4,3), (3,4,1,2), (4,3,2,1).
T(4,4) = 6: (2,4,1,3), (2,3,4,1), (3,1,4,2), (3,4,2,1), (4,1,2,3), (4,3,1,2).
Triangle T(n,k) begins:
  1;
  0,  0;
  0,  0,   1;
  0,  0,   0,    2;
  0,  0,   3,    0,    6;
  0,  0,   0,   20,    0,   24;
  0,  0,  15,   40,   90,    0,  120;
  0,  0,   0,  210,  420,  504,    0, 720;
  0,  0, 105, 1120, 2520, 2688, 3360,   0, 5040;
  ...
		

Crossrefs

Columns k=0-3 give: A000007, A000004, A123023 for n>0, A211880.
Row sums give A000166.
Diagonal gives: A000142(n-1) for n>1.
T(n,0) + T(n,2) + T(n,3) gives A055814(n).
Cf. A348075.

Programs

  • Maple
    A:= proc(n,k) option remember; `if`(n<0, 0, `if`(n=0, 1,
           add(mul(n-i, i=1..j-1)*A(n-j,k), j=2..k)))
        end:
    T:= (n, k)-> A(n, k) -`if`(k=0,0,A(n, k-1)):
    seq(seq(T(n,k), k=0..n), n=0..12);
  • Mathematica
    A[n_, k_] := A[n, k] = If[n < 0, 0, If[n == 0, 1,
         Sum[Product[n-i, {i, 1, j-1}]*A[n-j, k], {j, 2, k}]]];
    T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k-1]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 27 2013, translated from Maple *)

Formula

E.g.f. of column k>1: (exp(x^k/k)-1) * exp(Sum_{j=2..k-1} x^j/j); e.g.f. of column k<=1: 1-k.

A288954 Number of relaxed compacted binary trees of right height at most one with minimal sequences between branch nodes except before the first and after the last branch node on level 0.

Original entry on oeis.org

1, 1, 3, 13, 79, 555, 4605, 42315, 436275, 4894155, 60125625, 794437875, 11325612375, 172141044075, 2793834368325, 48009995908875, 874143494098875, 16757439016192875, 338309837281040625, 7157757510792763875, 158706419654857449375, 3673441093896736036875
Offset: 2

Views

Author

Michael Wallner, Jun 20 2017

Keywords

Comments

A relaxed compacted binary tree of size n is a directed acyclic graph consisting of a binary tree with n internal nodes, one leaf, and n pointers. It is constructed from a binary tree of size n, where the first leaf in a post-order traversal is kept and all other leaves are replaced by pointers. These links may point to any node that has already been visited by the post-order traversal. The right height is the maximal number of right-edges (or right children) on all paths from the root to any leaf after deleting all pointers. A branch node is a node with a left and right edge (no pointer). See the Genitrini et al. link. - Michael Wallner, Apr 20 2017
a(n) is the number of plane increasing trees with n+1 nodes where in the growth process induced by the labels a maximal young leaves and non-maximal young leaves alternate except for a sequence of maximal young leaves at the begininning and at the end. A young leaf is a leaf with no left sibling. A maximal young leaf is a young leaf with maximal label. See the Wallner link. - Michael Wallner, Apr 20 2017

Examples

			See A288950 and A288953.
		

Crossrefs

Cf. A288953 (variation without initial sequence).
Cf. A177145 (variation without initial and final sequence).
Cf. A001147 (relaxed compacted binary trees of right height at most one).
Cf. A082161 (relaxed compacted binary trees of unbounded right height).
Cf. A000032, A000246, A001879, A051577, A213527, A288950, A288952 (subclasses of relaxed compacted binary trees of right height at most one, see the Wallner link).
Cf. A000166, A000255, A000262, A052852, A123023, A130905, A176408, A201203 (variants of relaxed compacted binary trees of right height at most one, see the Wallner link).

Programs

  • Mathematica
    terms = 22; egf = 1/(3(1-z))(1/Sqrt[1-z^2] + (3z^3 - z^2 - 2z + 2)/((1-z)(1-z^2))) + O[z]^terms;
    CoefficientList[egf, z] Range[0, terms-1]! (* Jean-François Alcover, Dec 13 2018 *)

Formula

E.g.f.: 1/(3*(1-z))*( 1/sqrt(1-z^2) + (3*z^3-z^2-2*z+2)/((1-z)*(1-z^2)) ).

A359760 Triangle read by rows. The Kummer triangle, the coefficients of the Kummer polynomials. K(n, k) = binomial(n, k) * oddfactorial(k/2) if k is even, otherwise 0, where oddfactorial(z) := (2*z)!/(2^z*z!).

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 6, 0, 3, 1, 0, 10, 0, 15, 0, 1, 0, 15, 0, 45, 0, 15, 1, 0, 21, 0, 105, 0, 105, 0, 1, 0, 28, 0, 210, 0, 420, 0, 105, 1, 0, 36, 0, 378, 0, 1260, 0, 945, 0, 1, 0, 45, 0, 630, 0, 3150, 0, 4725, 0, 945, 1, 0, 55, 0, 990, 0, 6930, 0, 17325, 0, 10395, 0
Offset: 0

Views

Author

Peter Luschny, Jan 13 2023

Keywords

Comments

The Kummer numbers K(n, k) are a refinement of the oddfactorial numbers (A001147) in the sense that they are the coefficients of polynomials K(n, x) = Sum_{n..k} K(n, k) * x^k that take the value oddfactorial(n) at x = 1. The coefficients of x^n are the aerated oddfactorial numbers A123023.
These numbers appear in many different versions (see the crossrefs). They are the coefficients of the Chebyshev-Hermite polynomials in signed form when ordered in decreasing powers. Our exposition is based on the seminal paper by Kummer, which preceded the work of Chebyshev and Hermite for more than 20 years. They are also referred to as Bessel numbers of the second kind (Mansour et al.) when the odd powers are omitted.

Examples

			Triangle K(n, k) starts:
 [0] 1;
 [1] 1, 0;
 [2] 1, 0,  1;
 [3] 1, 0,  3, 0;
 [4] 1, 0,  6, 0,   3;
 [5] 1, 0, 10, 0,  15, 0;
 [6] 1, 0, 15, 0,  45, 0,   15;
 [7] 1, 0, 21, 0, 105, 0,  105, 0;
 [8] 1, 0, 28, 0, 210, 0,  420, 0, 105;
 [9] 1, 0, 36, 0, 378, 0, 1260, 0, 945, 0;
		

References

  • John Riordan, Introduction to Combinatorial Analysis, Dover (2002), pp. 85-86.

Crossrefs

Variants: Signed version: A073278. Other variants are the irregular triangle A100861 with zeros deleted, A066325 and A099174 with reversed rows, A111924, A144299, A104556.

Programs

  • Maple
    oddfactorial := proc(z) (2*z)! / (2^z*z!) end:
    K := (n, k) -> ifelse(irem(k, 2) = 1, 0, binomial(n, k) * oddfactorial(k/2)):
    seq(seq(K(n, k), k = 0..n), n = 0..11);
    # Alternative, as coefficients of polynomials:
    p := (n, x) -> 2^(n/2)*(-1/x^2)^(-n/2)*KummerU(-n/2, 1/2, -1/(2*x^2)):
    seq(print(seq(coeff(simplify(p(n, x)), x, k), k = 0..n)), n = 0 ..9);
    # Using the exponential generating function:
    egf := exp(x + (t*x)^2 / 2): ser := series(egf, x, 12):
    seq(print(seq(coeff(n! * coeff(ser, x, n), t, k), k = 0..n)), n = 0..9);
  • Mathematica
    K[n_, k_] := K[n, k] = Which[OddQ[k], 0, k == 0, 1, n == k, K[n - 1, n - 2], True, K[n - 1, k] n/(n - k)];
    Table[K[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 25 2023 *)
  • Python
    from functools import cache
    @cache
    def K(n: int, k: int) -> int:
        if k %  2: return 0
        if n <  3: return 1
        if n == k: return K(n - 1, n - 2)
        return (K(n - 1, k) * n) // (n - k)
    for n in range(10): print([K(n, k) for k in range(n + 1)])

Formula

Let p(n, x) = 2^(n/2)*(-1/x^2)^(-n/2)*KummerU(-n/2, 1/2, -1/(2*x^2)).
p(n, 1) = A000085(n); p(n, sqrt(2)) = A047974(n); p(n, 2) = A115329(n);
p(2, n) = A002522(n) (n >= 1); p(3, n) = A056107(n) (n >= 1);
p(n, n) = A359739(n) (n >= 1); 2^n*p(n, 1/2) = A005425(n).
K(n, k) = [x^k] p(n, x).
K(n, k) = [t^k] (n! * [x^n] exp(x + (t*x)^2 / 2)).
K(n, n) = A123023(n).
K(n, n-1) = A123023(n + 1).
K(2*n, 2*n) = A001147(n).
K(4*n, 2*n) = A359761, the central terms without zeros.
K(2*n+2, 2*n) = A001879.
Sum_{k=0..n} (-1)^n * i^k * K(n, k) = A001464(n), ((the number of even involutions) - (the number of odd involutions) in the symmetric group S_n (Robert Israel)).
Sum_{k=0..n} Sum_{j=0..k} K(n, j) = A000085(n + 1).
For a recursion see the Python program.

A380364 Number of rooted combinatorial maps with n edges and without faces of degree 1.

Original entry on oeis.org

1, 1, 4, 30, 284, 3240, 43282, 662760, 11446844, 220193310, 4669558564, 108251161920, 2723857695362, 73941952968000, 2154117314613604, 67038931862069790, 2219781607638887804, 77922680046440538600, 2890682855602209593362, 112998995448368143038120, 4642614436461699746566364
Offset: 0

Views

Author

Andrew Howroyd, Jan 28 2025

Keywords

Crossrefs

Cf. A379433 (planar), A380365 (sensed), A380366 (unsensed).

Programs

  • PARI
    seq(n)={my(A=O(x^(2*n+1)), g=serconvol(exp(x^2/2 + A),exp(-x + A)/(1-x))); Vec(substpol(1 + x*deriv(log(serlaplace(g))), x^2, x))}

A211880 Number of permutations of n elements with no fixed points and largest cycle of length 3.

Original entry on oeis.org

0, 0, 0, 2, 0, 20, 40, 210, 1120, 4760, 25200, 157850, 800800, 5345340, 35035000, 222472250, 1648046400, 12000388400, 88529240800, 720929459250, 5786188408000, 48072795270500, 424300329453000, 3731123025279650, 34083741984292000, 323768324084205000
Offset: 0

Views

Author

Alois P. Heinz, Feb 13 2013

Keywords

Comments

a(n) = A055814(n) - A123023(n). - Vaclav Kotesovec, Oct 09 2013

Examples

			a(3) = 2: (2,3,1), (3,1,2).
		

Crossrefs

Column k=3 of A211871.

Programs

  • Maple
    egf:= (exp(x^3/3)-1)*exp(x^2/2):
    a:= n-> n! *coeff(series(egf, x, n+1), x, n):
    seq(a(n), n=0..30);
  • Mathematica
    A[n_, k_] := A[n, k] = If[n < 0, 0, If[n == 0, 1,
         Sum[Product[n - i, {i, 1, j - 1}] A[n - j, k], {j, 2, k}]]];
    T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]];
    a[n_] := T[n, 3];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Sep 03 2021, after Alois P. Heinz in A211871 *)

Formula

E.g.f.: (exp(x^3/3)-1) * exp(x^2/2).
Recurrence: (n-3)*a(n) = (n-1)*(2*n-5)*a(n-2) + (n-3)*(n-2)*(n-1)*a(n-3) - (n-3)*(n-2)*(n-1)*a(n-4) - (n-4)*(n-3)*(n-2)*(n-1)*a(n-5). - Vaclav Kotesovec, Oct 09 2013

A333158 Irregular triangle read by rows: T(n,k) is the number of k-regular graphs on n labeled nodes with loops allowed, n >= 1, 0 <= k <= n + 1.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 3, 8, 8, 3, 1, 1, 0, 38, 0, 38, 0, 1, 1, 15, 208, 730, 730, 208, 15, 1, 1, 0, 1348, 0, 20670, 0, 1348, 0, 1, 1, 105, 10126, 188790, 781578, 781578, 188790, 10126, 105, 1, 1, 0, 86174, 0, 37885204, 0, 37885204, 0, 86174, 0, 1
Offset: 1

Views

Author

Andrew Howroyd, Mar 09 2020

Keywords

Comments

A loop adds 2 to the degree of its vertex.

Examples

			Triangle begins:
  1,   0,     1;
  1,   1,     1,      1;
  1,   0,     2,      0,      1;
  1,   3,     8,      8,      3,      1;
  1,   0,    38,      0,     38,      0,      1;
  1,  15,   208,    730,    730,    208,     15,     1;
  1,   0,  1348,      0,  20670,      0,   1348,     0,   1;
  1, 105, 10126, 188790, 781578, 781578, 188790, 10126, 105, 1;
  ...
		

Crossrefs

Row sums are A322635.
Columns k=0..4 are A000012, A123023, A108246, A110039 (with interspersed zeros), A228697.

Formula

T(n,k) = T(n, n+1-k).

A368213 Triangular array read by rows: Number of permutations of [n] that factor into exactly k-cycles, ordered by n (rows) and divisors k of n (columns).

Original entry on oeis.org

1, 1, 1, 1, 0, 2, 1, 3, 0, 6, 1, 0, 0, 0, 24, 1, 15, 40, 0, 0, 120, 1, 0, 0, 0, 0, 0, 720, 1, 105, 0, 1260, 0, 0, 0, 5040, 1, 0, 2240, 0, 0, 0, 0, 0, 40320, 1, 945, 0, 0, 72576, 0, 0, 0, 0, 362880, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3628800, 1, 10395, 246400, 1247400, 0, 6652800, 0, 0, 0, 0, 0, 39916800
Offset: 1

Views

Author

Marko Riedel, Dec 17 2023

Keywords

Examples

			Row n=6 is 1, 15, 40, 120 because there is one permutation of [6] consisting of six fixed points, there are 15 permutations consisting of three transpositions, there are forty permutations consisting of two three-cycles and there are one hundred and twenty permutations consisting of just one six-cycle (6!/6).
Triangular array starts:
[ 1] 1;
[ 2] 1,   1;
[ 3] 1,   0,    2;
[ 4] 1,   3,    0,    6;
[ 5] 1,   0,    0,    0,    24;
[ 6] 1,  15,   40,    0,     0, 120;
[ 7] 1,   0,    0,    0,     0,   0, 720;
[ 8] 1, 105,    0, 1260,     0,   0,   0, 5040;
[ 9] 1,   0, 2240,    0,     0,   0,   0,    0, 40320;
[10] 1, 945,    0,    0, 72576,   0,   0,    0,     0, 362880;
		

References

  • P. Flajolet and R. Sedgewick, Analytic Combinatorics, Cambridge University Press, 2009, pages 120-122.

Crossrefs

Cf. A005225 (row sums), A008290.
Cf. A123023 (column 2), A052502 (column 3), A060706 (column 4).

Programs

  • Maple
    T:= (n, m)-> `if`(irem(n,m)=0, n!/m^(n/m)/(n/m)!, 0):
    seq(seq(T(n, m), m = 1..n), n=1..15);
  • Mathematica
    A368213[n_,k_]:=If[Divisible[n,k],n!/(k^(n/k)(n/k)!),0];
    Table[A368213[n,k],{n,15},{k,n}] (* Paolo Xausa, Dec 18 2023 *)
  • SageMath
    def T(n, d): return factorial(n) // (d ** (n//d) * factorial(n//d))
    for n in range(1, 19):
        print([T(n, d) if n % d == 0 else 0 for d in range(1, n+1)])
    # Peter Luschny, Dec 17 2023

Formula

T(n, k) = n! / ( k^(n/k) * (n/k)! ) if k divides n otherwise 0.

A227937 Partitions of n labeled elements into subsets of two or three elements.

Original entry on oeis.org

1, 0, 1, 1, 3, 10, 25, 105, 385, 1540, 7245, 32725, 164395, 870870, 4689685, 27152125, 161786625, 997196200, 6443061625, 42702885225, 292938721075, 2078239413250, 15119319039825, 113390111659825, 873538909468225, 6894294734827500, 55855506234653125, 463151808682688125, 3927996120260086875, 34081631999814148750, 301951521812713898125, 2731127272307562253125, 25208456056107710010625, 237164027532948085570000
Offset: 0

Views

Author

David Eppstein, Oct 06 2013

Keywords

Comments

Periodic modulo two and modulo three, but appears to eventually be divisible by other prime powers.

Examples

			The five elements a, b, c, d, e have ten partitions into sets of size two or three: ab/cde, ac/bde, ad/bce, ae/bcd, bc/ade, bd/ace, be/acd, cd/abe, ce/abd, and de/abc.
		

Crossrefs

Programs

  • Mathematica
    Flatten[{1,RecurrenceTable[{2*a[n] - 2*(n-1)*a[n-2]-(n-2)*(n-1)*a[n-3] == 0,a[1]==0,a[2]==1,a[3]==1}, a, {n, 1, 20}]}] (* Vaclav Kotesovec, Oct 09 2013 *)
  • PARI
    x='x+O('x^66); Vec( serlaplace( exp( x^2/2 + x^3/6 ) ) ) \\ Joerg Arndt, Oct 07 2013

Formula

a(n) = (n-1)*a(n-2) + (n-1)*(n-2)*a(n-3)/2.
E.g.f.: exp( x^2/2 + x^3/6 ). [Joerg Arndt, Oct 07 2013]
a(n) ~ n^(2*n/3) * 2^(-n/3) * exp(2/9 - 2*n/3 - (2*n)^(1/3)/3 + (2*n)^(2/3)/2)/sqrt(3) * (1 + 34/(162*(2*n)^(1/3)) - 34802/(131220*(2*n)^(2/3))). - Vaclav Kotesovec, Oct 09 2013

A316666 Number of simple relaxed compacted binary trees of right height at most one with no sequences on level 1 and no final sequences on level 0.

Original entry on oeis.org

1, 0, 1, 3, 15, 87, 597, 4701, 41787, 413691, 4512993, 53779833, 695000919, 9680369943, 144560191149, 2303928046437, 39031251610227, 700394126116851, 13270625547477177, 264748979672169681, 5547121478845459983, 121784530649198053263, 2795749225338111831429, 66981491857058929294653
Offset: 0

Views

Author

Michael Wallner, Jul 10 2018

Keywords

Comments

A relaxed compacted binary tree of size n is a directed acyclic graph consisting of a binary tree with n internal nodes, one leaf, and at most n pointers. It is constructed from a binary tree of size n, where the first leaf in a post-order traversal is kept and all other leaves are replaced by pointers. These links may point to any node that has already been visited by the post-order traversal. It is called simple if for nodes with two pointers both point to the same node. The right height is the maximal number of right-edges (or right children) on all paths from the root to any leaf after deleting all pointers. See the Wallner link.
a(n) is one of two "basis" sequences for sequences of the form a(0)=a, a(1)=b, a(n) = n*a(n-1) + (n-1)*a(n-2), the second basis sequence being A096654 (with 0 appended as a(0)). The sum of these sequences is listed as A000255. - Gary Detlefs, Dec 11 2018

Crossrefs

Cf. A000032, A000246, A001879, A051577, A213527, A288950, A288952, A288953 (subclasses of relaxed compacted binary trees of right height at most one, see the Wallner link).
Cf. A000166, A000255, A000262, A052852, A123023, A130905, A176408, A201203 (variants of simple relaxed compacted binary trees of right height at most one, see the Wallner link).

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( (3*Exp(-x) + x-2)/(1-x)^2 )); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Dec 12 2018
  • Maple
    aseq := n-> 3*round((n+2)*n!/exp(1))-(n+2)*n!: bseq := n-> (n+2)*n!- 2* round((n+2)*n!/exp(1)): s := (a,b,n)-> a*aseq(n) + b*bseq( n): seq(s(1,0,n),n = 0..20);  # Gary Detlefs, Dec 11 2018
  • Mathematica
    terms = 24;
    CoefficientList[(3E^-z+z-2)/(1-z)^2 + O[z]^terms, z] Range[0, terms-1]! (* Jean-François Alcover, Sep 14 2018 *)
  • PARI
    Vec(serlaplace((3*exp(-x + O(x^25)) + x - 2)/(1 - x)^2)) \\ Andrew Howroyd, Jul 10 2018
    

Formula

E.g.f.: (3*exp(-z)+z-2)/(1-z)^2.
a(n) ~ (3*exp(-1) - 1) * n * n!. - Vaclav Kotesovec, Jul 12 2018
a(n) = 3*round((n+2)*n!/e) - (n+2)*n!. - Gary Detlefs, Dec 11 2018
From Seiichi Manyama, Apr 25 2025: (Start)
a(n) = 3 * A000255(n) - n! - (n+1)!.
a(0) = 1, a(1) = 0; a(n) = n*a(n-1) + (n-1)*a(n-2). (End)
Previous Showing 11-20 of 24 results. Next