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

A005442 a(n) = n!*Fibonacci(n+1).

Original entry on oeis.org

1, 1, 4, 18, 120, 960, 9360, 105840, 1370880, 19958400, 322963200, 5748019200, 111607372800, 2347586841600, 53178757632000, 1290674601216000, 33413695451136000, 919096314200064000, 26768324463648768000
Offset: 0

Views

Author

Keywords

Comments

Number of ways to use the elements of {1,...,n} once each to form a sequence of lists, each having length 1 or 2. - Bob Proctor, Apr 18 2005
Number of pairs (p,S) where p is a permutation of {1,2,...,n} and S is a subset of {1,2,...,n} such that if s is in S then p(s) is not in S. For example a(2) = 4 because we have (p=(1)(2), s={}); (p=(1,2), s={}); (p=(1,2), s={1}); (p=(1,2), s={2}) where p is given in cycle notation. - Geoffrey Critzer, Jul 01 2013
Another way to state the first comment: a(n) is the number of ways to partition [n] into blocks of size at most 2, order the blocks, and order the elements within each block. For example, a(5)=960 since there are 3 cases: 1) 1,2,3,4,5: 120 such ordered blocks, 1 way to order elements within blocks, hence 120 ways; 2) 12,3,4,5: 240 such ordered blocks, 2 ways to order elements within blocks, hence 480 ways; 3) 12,34,5: 90 such ordered blocks, 4 ways to order elements within blocks, hence 360 ways. - Enrique Navarrete, Sep 01 2023

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of Fibonacci Jabotinsky-triangle A039692.

Programs

  • Magma
    [Factorial(n)*Fibonacci(n+1): n in [0..20]]; // G. C. Greubel, Nov 20 2022
    
  • Mathematica
    Table[Fibonacci[n + 1]*n!, {n, 0, 20}] (* Zerinvary Lajos, Jul 09 2009 *)
  • PARI
    a(n) = n!*fibonacci(n+1) \\ Charles R Greathouse IV, Oct 03 2016
    
  • SageMath
    [fibonacci(n+1)*factorial(n) for n in range(21)] # G. C. Greubel, Nov 20 2022

Formula

a(n) = A039948(n,0).
E.g.f.: 1/(1-x-x^2).
D-finite with recurrence a(n) = n*a(n-1)+n*(n-1)*a(n-2). - Detlef Pauly (dettodet(AT)yahoo.de), Sep 22 2003
a(n) = D^n(1/(1-x)) evaluated at x = 0, where D is the operator sqrt(1+4*x)*d/dx. Cf. A080599 and A052585. - Peter Bala, Dec 07 2011

Extensions

Comments from Wolfdieter Lang

A080599 Expansion of e.g.f.: 2/(2-2*x-x^2).

Original entry on oeis.org

1, 1, 3, 12, 66, 450, 3690, 35280, 385560, 4740120, 64751400, 972972000, 15949256400, 283232149200, 5416632421200, 110988861984000, 2425817682288000, 56333385828720000, 1385151050307024000, 35950878932544576000, 982196278209226080000, 28175806418228108640000
Offset: 0

Views

Author

Detlef Pauly (dettodet(AT)yahoo.de), Feb 24 2003

Keywords

Comments

Number of ordered partitions of {1,..,n} with at most 2 elements per block. - Bob Proctor, Apr 18 2005
In other words, number of preferential arrangements of n things (see A000670) in which each clump has size 1 or 2. - N. J. A. Sloane, Apr 13 2014
Recurrences (of the hypergeometric type of the Jovovic formula) mean: multiplying the sequence vector from the left with the associated matrix of the recurrence coefficients (here: an infinite lower triangular matrix with the natural numbers in the main diagonal and the triangular series in the subdiagonal) recovers the sequence up to an index shift. In that sense, this sequence here and many other sequences of the OEIS are eigensequences. - Gary W. Adamson, Feb 14 2011
Number of intervals in the weak (Bruhat) order of S_n that are Boolean algebras. - Richard Stanley, May 09 2011
a(n) = D^n(1/(1-x)) evaluated at x = 0, where D is the operator sqrt(1+2*x)*d/dx. Cf. A000085, A005442 and A052585. - Peter Bala, Dec 07 2011
From Gus Wiseman, Jul 04 2020: (Start)
Also the number of (1,1,1)-avoiding or cubefree sequences of length n covering an initial interval of positive integers. For example, the a(0) = 1 through a(3) = 12 sequences are:
() (1) (11) (112)
(12) (121)
(21) (122)
(123)
(132)
(211)
(212)
(213)
(221)
(231)
(312)
(321)
(End)

Examples

			From _Gus Wiseman_, Jul 04 2020: (Start)
The a(0) = 1 through a(3) = 12 ordered set partitions with block sizes <= 2 are:
  {}  {{1}}  {{1,2}}    {{1},{2,3}}
             {{1},{2}}  {{1,2},{3}}
             {{2},{1}}  {{1,3},{2}}
                        {{2},{1,3}}
                        {{2,3},{1}}
                        {{3},{1,2}}
                        {{1},{2},{3}}
                        {{1},{3},{2}}
                        {{2},{1},{3}}
                        {{2},{3},{1}}
                        {{3},{1},{2}}
                        {{3},{2},{1}}
(End)
		

Crossrefs

Column k=2 of A276921.
Cubefree numbers are A004709.
(1,1)-avoiding patterns are A000142.
(1,1,1)-avoiding compositions are A232432.
(1,1,1)-matching patterns are A335508.
(1,1,1)-avoiding permutations of prime indices are A335511.
(1,1,1)-avoiding compositions are ranked by A335513.
(1,1,1,1)-avoiding patterns are A189886.

Programs

  • Magma
    [n le 2 select 1 else (n-1)*Self(n-1) + Binomial(n-1,2)*Self(n-2): n in [1..31]]; // G. C. Greubel, Jan 31 2023
    
  • Maple
    a:= n-> n! *(Matrix([[1,1], [1/2,0]])^n)[1,1]:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jun 01 2009
    a:= gfun:-rectoproc({a(n) = n*a(n-1)+(n*(n-1)/2)*a(n-2),a(0)=1,a(1)=1},a(n),remember):
    seq(a(n), n=0..40); # Robert Israel, Nov 01 2015
  • Mathematica
    Table[n!*SeriesCoefficient[-2/(-2+2*x+x^2),{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 13 2012 *)
    Round@Table[n! ((1+Sqrt[3])^(n+1) - (1-Sqrt[3])^(n+1))/(2^(n+1) Sqrt[3]), {n, 0, 20}] (* Vladimir Reshetnikov, Oct 31 2015 *)
  • PARI
    Vec(serlaplace((2/(2-2*x-x^2) + O(x^30)))) \\ Michel Marcus, Nov 02 2015
    
  • SageMath
    A002605=BinaryRecurrenceSequence(2,2,0,1)
    def A080599(n): return factorial(n)*A002605(n+1)/2^n
    [A080599(n) for n in range(41)] # G. C. Greubel, Jan 31 2023

Formula

a(n) = n*a(n-1) + (n*(n-1)/2)*a(n-2). - Vladeta Jovovic, Aug 22 2003
E.g.f.: 1/(1-x-x^2/2). - Richard Stanley, May 09 2011
a(n) ~ n!*((1+sqrt(3))/2)^(n+1)/sqrt(3). - Vaclav Kotesovec, Oct 13 2012
a(n) = n!*((1+sqrt(3))^(n+1) - (1-sqrt(3))^(n+1))/(2^(n+1)*sqrt(3)). - Vladimir Reshetnikov, Oct 31 2015
a(n) = A090932(n) * A002530(n+1). - Robert Israel, Nov 01 2015

A052563 E.g.f.: (1-x)/(1-3*x).

Original entry on oeis.org

1, 2, 12, 108, 1296, 19440, 349920, 7348320, 176359680, 4761711360, 142851340800, 4714094246400, 169707392870400, 6618588321945600, 277980709521715200, 12509131928477184000, 600438332566904832000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Laguerre transform of A052585. - Paul Barry, Aug 08 2008

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!((1-x)/(1-3*x))); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, May 23 2018
  • Maple
    spec := [S,{S=Sequence(Prod(Union(Z,Z),Sequence(Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    With[{nn=20},CoefficientList[Series[(1-x)/(1-3x),{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, May 21 2014 *)
  • PARI
    x='x+O('x^30); Vec(serlaplace((1-x)/(1-3*x))) \\ G. C. Greubel, May 23 2018
    

Formula

E.g.f.: (-1+x)/(-1+3*x)
Recurrence: {a(0)=1, a(1)=2, (-3*n-3)*a(n)+a(n+1)=0}
a(n) = 2*3^(n-1)*n!.
a(n) = Sum_{k=0..n} binomial(n,k)(n!/k!)k!*A001045(k+1). - Paul Barry, Aug 08 2008

A366942 Expansion of e.g.f. 1/(1-x-2*x^2-3*x^3).

Original entry on oeis.org

1, 1, 6, 48, 408, 5040, 72000, 1184400, 22619520, 482993280, 11459750400, 299495750400, 8531976499200, 263353163673600, 8754879893760000, 311808414677760000, 11845876873678848000, 478163414336864256000, 20436460099541950464000, 921972301728418676736000
Offset: 0

Views

Author

Enrique Navarrete, Oct 29 2023

Keywords

Comments

a(n) is the number of ways to partition [n] into blocks of size at most 3, order the blocks, order the elements within each block, and choose 1 element from each block.
E.g.: a(4) = 408 since we have the following cases:
1,2,3,4: 24 such orderings, 1 way to choose one element from each block;
12,34: 24 such orderings, 2*2 ways to choose one element from each block;
12,3,4: 72 such orderings, 2*1*1 ways to choose one element from each block;
123,4: 48 such orderings, 3*1 ways to choose one element from each block;
so 24*1 + 24*4 + 72*2 + 48*3 = 408 ways.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1, add(
          a(n-j)*binomial(n, j)*j!*j, j=1..min(3, n)))
        end:
    seq(a(n), n=0..19);  # Alois P. Heinz, Dec 14 2023
  • Mathematica
    With[{m = 20}, Range[0, m]! * CoefficientList[Series[1/(1 - x - 2*x^2 - 3*x^3), {x, 0, m}], x]] (* Amiram Eldar, Oct 30 2023 *)
  • PARI
    my(x='x+O('x^25)); Vec(serlaplace(1/(1-x-2*x^2-3*x^3))) \\ Michel Marcus, Oct 30 2023

Formula

a(n) = A000142(n)*A101822(n).
a(n) = n*(a(n-1)+(n-1)*(2*a(n-2)+(n-2)*3*a(n-3))) for n>=3. - Alois P. Heinz, Dec 14 2023

A331403 E.g.f.: 1 / ((1 + x) * sqrt(1 - 2*x)).

Original entry on oeis.org

1, 0, 3, 6, 81, 540, 7155, 85050, 1346625, 22339800, 431331075, 9004668750, 208178118225, 5199538043700, 140664514065075, 4080315642653250, 126613733680058625, 4180226398201854000, 146399020309066399875, 5419213146765629961750, 211446723837565171580625
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 16 2020

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 20; CoefficientList[Series[1/((1 + x) Sqrt[1 - 2 x]), {x, 0, nmax}], x] Range[0, nmax]!
    Table[n! Sum[(-1)^(n - k) (2 k - 1)!!/k!, {k, 0, n}], {n, 0, 20}]
  • PARI
    a(n) = {n! * sum(k=0, n, (-1)^(n - k) * (2*k)! / (2^k*k!^2))} \\ Andrew Howroyd, Jan 16 2020
    
  • PARI
    seq(n) = {Vec(serlaplace(1 / ((1 + x) * sqrt(1 - 2*x + O(x*x^n)))))} \\ Andrew Howroyd, Jan 16 2020

Formula

a(n) = n! * Sum_{k=0..n} (-1)^(n - k) * (2*k - 1)!! / k!.
D-finite with recurrence: a(n) +(-n+1)*a(n-1) -(2*n-1)*(n-1)*a(n-2)=0. - R. J. Mathar, Jan 25 2020
a(n) ~ 2^(n + 3/2) * n^n / (3*exp(n)). - Vaclav Kotesovec, Jan 26 2020
Showing 1-5 of 5 results.