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 2943 results. Next

A131689 Triangle of numbers T(n,k) = k!*Stirling2(n,k) = A000142(k)*A048993(n,k) read by rows, T(n, k) for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 6, 6, 0, 1, 14, 36, 24, 0, 1, 30, 150, 240, 120, 0, 1, 62, 540, 1560, 1800, 720, 0, 1, 126, 1806, 8400, 16800, 15120, 5040, 0, 1, 254, 5796, 40824, 126000, 191520, 141120, 40320, 0, 1, 510, 18150, 186480, 834120, 1905120, 2328480, 1451520, 362880
Offset: 0

Views

Author

Philippe Deléham, Sep 14 2007

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows given by [0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,...] DELTA [1,1,2,2,3,3,4,4,5,5,6,6,...] where DELTA is the operator defined in A084938; another version of A019538.
See also A019538: version with n > 0 and k > 0. - Philippe Deléham, Nov 03 2008
From Peter Bala, Jul 21 2014: (Start)
T(n,k) gives the number of (k-1)-dimensional faces in the interior of the first barycentric subdivision of the standard (n-1)-dimensional simplex. For example, the barycentric subdivision of the 1-simplex is o--o--o, with 1 interior vertex and 2 interior edges, giving T(2,1) = 1 and T(2,2) = 2.
This triangle is used when calculating the face vectors of the barycentric subdivision of a simplicial complex. Let S be an n-dimensional simplicial complex and write f_k for the number of k-dimensional faces of S, with the usual convention that f_(-1) = 1, so that F := (f_(-1), f_0, f_1,...,f_n) is the f-vector of S. If M(n) denotes the square matrix formed from the first n+1 rows and n+1 columns of the present triangle, then the vector F*M(n) is the f-vector of the first barycentric subdivision of the simplicial complex S (Brenti and Welker, Lemma 2.1). For example, the rows of Pascal's triangle A007318 (but with row and column indexing starting at -1) are the f-vectors for the standard n-simplexes. It follows that A007318*A131689, which equals A028246, is the array of f-vectors of the first barycentric subdivision of standard n-simplexes. (End)
This triangle T(n, k) appears in the o.g.f. G(n, x) = Sum_{m>=0} S(n, m)*x^m with S(n, m) = Sum_{j=0..m} j^n for n >= 1 as G(n, x) = Sum_{k=1..n} (x^k/(1 - x)^(k+2))*T(n, k). See also the Eulerian triangle A008292 with a Mar 31 2017 comment for a rewritten form. For the e.g.f. see A028246 with a Mar 13 2017 comment. - Wolfdieter Lang, Mar 31 2017
T(n,k) = the number of alignments of length k of n strings each of length 1. See Slowinski. An example is given below. Cf. A122193 (alignments of strings of length 2) and A299041 (alignments of strings of length 3). - Peter Bala, Feb 04 2018
The row polynomials R(n,x) are the Fubini polynomials. - Emanuele Munarini, Dec 05 2020
From Gus Wiseman, Feb 18 2022: (Start)
Also the number of patterns of length n with k distinct parts (or with maximum part k), where we define a pattern to be a finite sequence covering an initial interval of positive integers. For example, row n = 3 counts the following patterns:
(1,1,1) (1,2,2) (1,2,3)
(2,1,2) (1,3,2)
(2,2,1) (2,1,3)
(1,1,2) (2,3,1)
(1,2,1) (3,1,2)
(2,1,1) (3,2,1)
(End)
Regard A048994 as a lower-triangular matrix and divide each term A048994(n,k) by n!, then this is the matrix inverse. Because Sum_{k=0..n} (A048994(n,k) * x^n / n!) = A007318(x,n), Sum_{k=0..n} (A131689(n,k) * A007318(x,k)) = x^n. - Natalia L. Skirrow, Mar 23 2023
T(n,k) is the number of ordered partitions of [n] into k blocks. - Alois P. Heinz, Feb 21 2025

Examples

			The triangle T(n,k) begins:
  n\k 0 1    2     3      4       5        6        7        8        9      10 ...
  0:  1
  1:  0 1
  2:  0 1    2
  3:  0 1    6     6
  4:  0 1   14    36     24
  5:  0 1   30   150    240     120
  6:  0 1   62   540   1560    1800      720
  7:  0 1  126  1806   8400   16800    15120     5040
  8:  0 1  254  5796  40824  126000   191520   141120    40320
  9:  0 1  510 18150 186480  834120  1905120  2328480  1451520   362880
  10: 0 1 1022 55980 818520 5103000 16435440 29635200 30240000 16329600 3628800
  ... reformatted and extended. - _Wolfdieter Lang_, Mar 31 2017
From _Peter Bala_, Feb 04 2018: (Start)
T(4,2) = 14 alignments of length 2 of 4 strings of length 1. Examples include
  (i) A -    (ii) A -    (iii) A -
      B -         B -          - B
      C -         - C          - C
      - D         - D          - D
There are C(4,1) = 4 alignments of type (i) with a single gap character - in column 1, C(4,2) = 6 alignments of type (ii) with two gap characters in column 1 and C(4,3) = 4 alignments of type (iii) with three gap characters in column 1, giving a total of 4 + 6 + 4 = 14 alignments. (End)
		

Crossrefs

Case m=1 of the polynomials defined in A278073.
Cf. A000142 (diagonal), A000670 (row sums), A000012 (alternating row sums), A210029 (central terms).
Cf. A008292, A028246 (o.g.f. and e.g.f. of sums of powers).
A version for partitions is A116608, or by maximum A008284.
A version for compositions is A235998, or by maximum A048004.
Classes of patterns:
- A000142 = strict
- A005649 = anti-run, complement A069321
- A019536 = necklace
- A032011 = distinct multiplicities
- A060223 = Lyndon
- A226316 = (1,2,3)-avoiding, weakly A052709, complement A335515
- A296975 = aperiodic
- A345194 = alternating, up/down A350354, complement A350252
- A349058 = weakly alternating
- A351200 = distinct runs
- A351292 = distinct run-lengths

Programs

  • Julia
    function T(n, k)
        if k < 0 || k > n return 0 end
        if n == 0 && k == 0 return 1 end
        k*(T(n-1, k-1) + T(n-1, k))
    end
    for n in 0:7
        println([T(n, k) for k in 0:n])
    end
    # Peter Luschny, Mar 26 2020
    
  • Maple
    A131689 := (n,k) -> Stirling2(n,k)*k!: # Peter Luschny, Sep 17 2011
    # Alternatively:
    A131689_row := proc(n) 1/(1-t*(exp(x)-1)); expand(series(%,x,n+1)); n!*coeff(%,x,n); PolynomialTools:-CoefficientList(%,t) end:
    for n from 0 to 9 do A131689_row(n) od; # Peter Luschny, Jan 23 2017
  • Mathematica
    t[n_, k_] := k!*StirlingS2[n, k]; Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 25 2014 *)
    T[n_, k_] := If[n <= 0 || k <= 0, Boole[n == 0 && k == 0], Sum[(-1)^(i + k) Binomial[k, i] i^(n + k), {i, 0, k}]]; (* Michael Somos, Jul 08 2018 *)
  • PARI
    {T(n, k) = if( n<0, 0, sum(i=0, k, (-1)^(k + i) * binomial(k, i) * i^n))};
    /* Michael Somos, Jul 08 2018 */
    
  • SageMath
    @cached_function
    def F(n): # Fubini polynomial
        R. = PolynomialRing(ZZ)
        if n == 0: return R(1)
        return R(sum(binomial(n, k)*F(n - k)*x for k in (1..n)))
    for n in (0..9): print(F(n).list()) # Peter Luschny, May 21 2021

Formula

T(n,k) = k*(T(n-1,k-1) + T(n-1,k)) with T(0,0)=1. Sum_{k=0..n} T(n,k)*x^k = (-1)^n*A000629(n), A033999(n), A000007(n), A000670(n), A004123(n+1), A032033(n), A094417(n), A094418(n), A094419(n) for x = -2, -1, 0, 1, 2, 3, 4, 5, 6 respectively. [corrected by Philippe Deléham, Feb 11 2013]
Sum_{k=0..n} T(n,k)*x^(n-k) = A000012(n), A000142(n), A000670(n), A122704(n) for x=-1, 0, 1, 2 respectively. - Philippe Deléham, Oct 09 2007
Sum_{k=0..n} (-1)^k*T(n,k)/(k+1) = Bernoulli numbers A027641(n)/A027642(n). - Peter Luschny, Sep 17 2011
G.f.: F(x,t) = 1 + x*t + (x+x^2)*t^2/2! + (x+6*x^2+6*x^3)*t^3/3! + ... = Sum_{n>=0} R(n,x)*t^n/n!.
The row polynomials R(n,x) satisfy the recursion R(n+1,x) = (x+x^2)*R'(n,x) + x*R(n,x) where ' indicates differentiation with respect to x. - Philippe Deléham, Feb 11 2013
T(n,k) = [t^k] (n! [x^n] (1/(1-t*(exp(x)-1)))). - Peter Luschny, Jan 23 2017
The n-th row polynomial has the form x o x o ... o x (n factors), where o denotes the black diamond multiplication operator of Dukes and White. See also Bala, Example E8. - Peter Bala, Jan 08 2018

A001013 Jordan-Polya numbers: products of factorial numbers A000142.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 24, 32, 36, 48, 64, 72, 96, 120, 128, 144, 192, 216, 240, 256, 288, 384, 432, 480, 512, 576, 720, 768, 864, 960, 1024, 1152, 1296, 1440, 1536, 1728, 1920, 2048, 2304, 2592, 2880, 3072, 3456, 3840, 4096, 4320, 4608, 5040, 5184, 5760
Offset: 1

Views

Author

Keywords

Comments

Also, numbers of the form 1^d_1*2^d_2*3^d_3*...*k^d_k where k, d_1, ..., d_k are natural numbers satisfying d_1 >= d_2 >= d_3 >= ... >= d_k >= 1. - N. J. A. Sloane, Jun 14 2015
Possible orders of automorphism groups of trees.
Except for the numbers 2, 9 and 10 this sequence is conjectured to be the same as A034878.
Equivalently, (a(n)/6)*(6*x^2 - 6*x + (6*x-3)*a(n) + 2*a(n)^2 + 1) = N^2 has an integer solution. - Ralf Stephan, Dec 04 2004
Named after the French mathematician Camille Jordan (1838-1922) and the Hungarian mathematician George Pólya (1887-1985). - Amiram Eldar, May 22 2021
Possible numbers of transitive orientations of comparability graphs (Golumbic, 1977). - David Eppstein, Dec 29 2021

Examples

			864 = (3!)^2*4!.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B23, p. 123.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000142, A034878, A093373 (complement), A344438 (characteristic function).
Union of A344181 and A344179. Subsequence of A025487 (see also A064783).
See also A359636 and A359751.

Programs

  • Haskell
    import Data.Set (empty, fromList, deleteFindMin, union)
    import qualified Data.Set as Set (null)
    a001013 n = a001013_list !! (n-1)
    a001013_list = 1 : h 0 empty [1] (drop 2 a000142_list) where
       h z s mcs xs'@(x:xs)
        | Set.null s || x < m = h z (union s (fromList $ map (* x) mcs)) mcs xs
        | m == z = h m s' mcs xs'
        | otherwise = m : h m (union s' (fromList (map (* m) $ init (m:mcs)))) (m:mcs) xs'
        where (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, Nov 13 2014
    
  • Maple
    N:= 10000: # get all terms <= N
    S:= {1}:
    for k from 2 do
      kf:= k!;
      if kf > N then break fi;
      S := S union {seq(seq(kf^j * s, j = 1 .. floor(log[kf](N/s))),s=S)};
    od:
    S;   # if using Maple 11 or earlier, uncomment the next line:
    # sort(convert(S,list));
    # Robert Israel, Sep 09 2014
  • Mathematica
    For[p=0; a=f=Table[n!, {n, 1, 8}], p=!=a, p=a; a=Select[Union@@Outer[Times, f, a], #<=8!&]]; a
  • PARI
    list(lim,mx=lim)=if(lim<2, return([1])); my(v=[1],t=1); for(n=2,mx, t*=n; if(t>lim, break); v=concat(v,t*list(lim\t, t))); Set(v) \\ Charles R Greathouse IV, May 18 2015
    
  • Python
    def aupto(lim, mx=None):
        if lim < 2: return [1]
        v, t = [1], 1
        if mx == None: mx = lim
        for k in range(2, mx+1):
            t *= k
            if t > lim: break
            v += [t*rest for rest in aupto(lim//t, t)]
        return sorted(set(v))
    print(aupto(5760)) # Michael S. Branicky, Jul 21 2021 after Charles R Greathouse IV
  • Sage
    # uses[prod_hull from A246663]
    prod_hull(factorial, 5760) # Peter Luschny, Sep 09 2014
    

Extensions

More terms, formula from Christian G. Bower, Dec 15 1999
Edited by Dean Hickerson, Sep 17 2002

A059590 Numbers obtained by reinterpreting base-2 representation of n in the factorial base: a(n) = Sum_{k>=0} A030308(n,k)*A000142(k+1).

Original entry on oeis.org

0, 1, 2, 3, 6, 7, 8, 9, 24, 25, 26, 27, 30, 31, 32, 33, 120, 121, 122, 123, 126, 127, 128, 129, 144, 145, 146, 147, 150, 151, 152, 153, 720, 721, 722, 723, 726, 727, 728, 729, 744, 745, 746, 747, 750, 751, 752, 753, 840, 841, 842, 843, 846, 847, 848, 849, 864, 865
Offset: 0

Views

Author

Henry Bottomley, Jan 24 2001

Keywords

Comments

Numbers that are sums of distinct factorials (0! and 1! not treated as distinct).
Complement of A115945; A115944(a(n)) > 0; A115647 is a subsequence. - Reinhard Zumkeller, Feb 02 2006
A115944(a(n)) = 1. - Reinhard Zumkeller, Dec 04 2011
From Tilman Piesk, Jun 04 2012: (Start)
The inversion vector (compare A007623) of finite permutation a(n) (compare A055089, A195663) has only zeros and ones. Interpreted as a binary number it is 2*n (or n when the inversion vector is defined without the leading 0).
The inversion set of finite permutation a(n) interpreted as a binary number (compare A211362) is A211364(n).
(End)

Examples

			128 is in the sequence since 5! + 3! + 2! = 128.
a(22) = 128. a(22) = a(6) + (1 + floor(log(16) / log(2)))! = 8 + 5! = 128. Also, 22 = 10110_2. Therefore, a(22) = 1 * 5! + 0 * 4! + 1 * 3! + 1 + 2! + 0 * 0! = 128. - _David A. Corneth_, Aug 21 2016
		

Crossrefs

Indices of zeros in A257684.
Cf. A275736 (left inverse).
Cf. A025494, A060112 (subsequences).
Subsequence of A060132, A256450 and A275804.
Other sequences that are built by replacing 2^k in the binary representation with other numbers: A029931 (naturals), A089625 (primes), A022290 (Fibonacci), A197433 (Catalans), A276091 (n*n!), A275959 ((2n)!/2). Cf. also A276082 & A276083.

Programs

  • Haskell
    import Data.List (elemIndices)
    a059590 n = a059590_list !! n
    a059590_list = elemIndices 1 $ map a115944 [0..]
    -- Reinhard Zumkeller, Dec 04 2011
    
  • Maple
    [seq(bin2facbase(j),j=0..64)]; bin2facbase := proc(n) local i; add((floor(n/(2^i)) mod 2)*((i+1)!),i=0..floor_log_2(n)); end;
    floor_log_2 := proc(n) local nn,i; nn := n; for i from -1 to n do if(0 = nn) then RETURN(i); fi; nn := floor(nn/2); od; end;
    # next Maple program:
    a:= n-> (l-> add(l[j]*j!, j=1..nops(l)))(Bits[Split](n)):
    seq(a(n), n=0..57);  # Alois P. Heinz, Aug 12 2025
  • Mathematica
    a[n_] :=  Reverse[id = IntegerDigits[n, 2]].Range[Length[id]]!; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Jun 19 2012, after Philippe Deléham *)
  • PARI
    a(n) = if(n>0, a(n-msb(n)) + (1+logint(n,2))!, 0)
    msb(n) = 2^#binary(n)>>1
    {my(b = binary(n)); sum(i=1,#b,b[i]*(#b+1-i)!)} \\ David A. Corneth, Aug 21 2016
    
  • Python
    def facbase(k, f):
        return sum(f[i] for i, bi in enumerate(bin(k)[2:][::-1]) if bi == "1")
    def auptoN(N): # terms up to N factorial-base digits; 13 generates b-file
        f = [factorial(i) for i in range(1, N+1)]
        return list(facbase(k, f) for k in range(2**N))
    print(auptoN(5)) # Michael S. Branicky, Oct 15 2022

Formula

G.f. 1/(1-x) * Sum_{k>=0} (k+1)!*x^2^k/(1+x^2^k). - Ralf Stephan, Jun 24 2003
a(n) = Sum_{k>=0} A030308(n,k)*A000142(k+1). - Philippe Deléham, Oct 15 2011
From Antti Karttunen, Aug 19 2016: (Start)
a(0) = 0, a(2n) = A153880(a(n)), a(2n+1) = 1+A153880(a(n)).
a(n) = A225901(A276091(n)).
a(n) = A276075(A019565(n)).
a(A275727(n)) = A276008(n).
A275736(a(n)) = n.
A276076(a(n)) = A019565(n).
A007623(a(n)) = A007088(n).
(End)
a(n) = a(n - mbs(n)) + (1 + floor(log(n) / log(2)))!. - David A. Corneth, Aug 21 2016

Extensions

Name changed (to emphasize the functional nature of the sequence) with the old definition moved to the comments by Antti Karttunen, Aug 21 2016

A068106 Euler's difference table: triangle read by rows, formed by starting with factorial numbers (A000142) and repeatedly taking differences. T(n,n) = n!, T(n,k) = T(n,k+1) - T(n-1,k).

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 2, 3, 4, 6, 9, 11, 14, 18, 24, 44, 53, 64, 78, 96, 120, 265, 309, 362, 426, 504, 600, 720, 1854, 2119, 2428, 2790, 3216, 3720, 4320, 5040, 14833, 16687, 18806, 21234, 24024, 27240, 30960, 35280, 40320, 133496, 148329, 165016, 183822, 205056, 229080, 256320, 287280, 322560, 362880
Offset: 0

Views

Author

N. J. A. Sloane, Apr 12 2002

Keywords

Comments

Triangle T(n,k) (n >= 1, 1 <= k <= n) giving number of ways of winning with (n-k+1)st card in the generalized "Game of Thirteen" with n cards.
From Emeric Deutsch, Apr 21 2009: (Start)
T(n-1,k-1) is the number of non-derangements of {1,2,...,n} having largest fixed point equal to k. Example: T(3,1)=3 because we have 1243, 4213, and 3241.
Mirror image of A047920.
(End)

Examples

			Triangle begins:
[0]    1;
[1]    0,    1;
[2]    1,    1,    2;
[3]    2,    3,    4,    6;
[4]    9,   11,   14,   18,   24;
[5]   44,   53,   64,   78,   96,  120;
[6]  265,  309,  362,  426,  504,  600,  720;
[7] 1854, 2119, 2428, 2790, 3216, 3720, 4320, 5040.
		

Crossrefs

Row sums give A002467.
Diagonals give A000142, A001563, A001564, A001565, A001688, A001689, A023043, A023044, A023045, A023046, A023047 (factorials and k-th differences, k=1..10).
See A047920 and A086764 for other versions.
T(2*n, n) is A033815.

Programs

  • Haskell
    a068106 n k = a068106_tabl !! n !! k
    a068106_row n = a068106_tabl !! n
    a068106_tabl = map reverse a047920_tabl
    -- Reinhard Zumkeller, Mar 05 2012
  • Maple
    d[0] := 1: for n to 15 do d[n] := n*d[n-1]+(-1)^n end do: T := proc (n, k) if k <= n then sum(binomial(k, j)*d[n-j], j = 0 .. k) else 0 end if end proc: for n from 0 to 9 do seq(T(n, k), k = 0 .. n) end do; # yields sequence in triangular form; Emeric Deutsch, Jul 18 2009
  • Mathematica
    t[n_, k_] := Sum[(-1)^j*Binomial[n-k, j]*(n-j)!, {j, 0, n}]; Flatten[ Table[ t[n, k], {n, 0, 9}, {k, 0, n}]] (* Jean-François Alcover, Feb 21 2012, after Philippe Deléham *)
    T[n_, k_] := n! HypergeometricPFQ[{k-n}, {-n}, -1];
    Table[T[n, k], {n,0,9}, {k,0,n}] // Flatten (* Peter Luschny, Oct 05 2017 *)

Formula

T(n, k) = Sum_{j>= 0} (-1)^j*binomial(n-k, j)*(n-j)!. - Philippe Deléham, May 29 2005
From Emeric Deutsch, Jul 18 2009: (Start)
T(n,k) = Sum_{j=0..k} d(n-j)*binomial(k, j), where d(i) = A000166(i) are the derangement numbers.
Sum_{k=0..n} (k+1)*T(n,k) = A000166(n+2) (the derangement numbers). (End)
T(n, k) = n!*hypergeom([k-n], [-n], -1). - Peter Luschny, Oct 05 2017
D-finite recurrence for columns: T(n,k) = n*T(n-1,k) + (n-k)*T(n-2,k). - Georg Fischer, Aug 13 2022

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 01 2003
Edited by N. J. A. Sloane, Sep 24 2011

A001688 4th forward differences of factorial numbers A000142.

Original entry on oeis.org

9, 53, 362, 2790, 24024, 229080, 2399760, 27422640, 339696000, 4536362880, 64988179200, 994447238400, 16190733081600, 279499828608000, 5100017213491200, 98087346669312000, 1983334021853184000, 42063950934061056000, 933754193111900160000
Offset: 0

Views

Author

Keywords

References

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

Crossrefs

Programs

  • Mathematica
    Table[(n^4 + 6*n^3 + 17*n^2 + 20*n + 9) n!, {n, 0, 20}] (* T. D. Noe, Aug 09 2012 *)
    Differences[Range[0,30]!,4] (* Harvey P. Dale, Jun 06 2017 *)
  • PARI
    a(n)=if(n<0,0,n!*(n^4 + 6*n^3 + 17*n^2 + 20*n + 9))

Formula

For n>=0 a(n) = n!*(n^4 + 6*n^3 + 17*n^2 + 20*n + 9). - Benoit Cloitre, Jun 10 2004
G.f.: -log(-x+1)+1+2/(x-1)^4*x*(4-3*x+2*x^2). - Simon Plouffe, Master's Thesis, Uqam 1992
E.g.f.: (9 + 8*x + 6*x^2 + x^4)/(1 - x)^5. - Ilya Gutkovskiy, Jan 20 2017
a(n) = (n+5)*a(n-1) - (n-1)*a(n-2) with a(0) = 9 and a(1) = 53. Cf. A095177. - Peter Bala, Jul 22 2021

A001689 5th forward differences of factorial numbers A000142.

Original entry on oeis.org

44, 309, 2428, 21234, 205056, 2170680, 25022880, 312273360, 4196666880, 60451816320, 929459059200, 15196285843200, 263309095526400, 4820517384883200, 92987329455820800, 1885246675183872000, 40080616912207872000, 891690242177839104000
Offset: 0

Views

Author

Keywords

References

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

Crossrefs

Programs

  • Mathematica
    Differences[Table[n!, {n, 0, 25}], 5] (* T. D. Noe, Aug 09 2012 *)

Formula

a(n) = (n^5 + 10*n^4 + 45*n^3 + 100*n^2 + 109*n + 44)*n! - Mitch Harris, Jul 10 2008
E.g.f.: (44 + 45*x + 20*x^2 + 10*x^3 + x^5)/(1 - x)^6. - Ilya Gutkovskiy, Jan 20 2017
a(n) = (n+6)*a(n-1) - (n-1)*a(n-2) with a(0) = 44 and a(1) = 309. Cf. A096307. - Peter Bala, Jul 22 2021

A082491 a(n) = n! * d(n), where n! = factorial numbers (A000142), d(n) = subfactorial numbers (A000166).

Original entry on oeis.org

1, 0, 2, 12, 216, 5280, 190800, 9344160, 598066560, 48443028480, 4844306476800, 586161043776000, 84407190782745600, 14264815236056985600, 2795903786354347468800, 629078351928420506112000, 161044058093696572354560000, 46541732789077953723039744000
Offset: 0

Views

Author

Emanuele Munarini, Apr 28 2003

Keywords

Comments

a(n) is also the number of pairs of n-permutations p and q such that p(x)<>q(x) for each x in { 1, 2, ..., n }.
Or number of n X n matrices with exactly one 1 and one 2 in each row and column, other entries 0 (cf. A001499). - Vladimir Shevelev, Mar 22 2010
a(n) is approximately equal to (n!)^2/e. - J. M. Bergot, Jun 09 2018

Crossrefs

Programs

  • Maple
    with (combstruct):a:=proc(m) [ZL, {ZL=Set(Cycle(Z, card>=m))}, labeled]; end: ZLL:=a(2):seq(count(ZLL, size=n)*n!, n=0..15); # Zerinvary Lajos, Jun 11 2008
  • Mathematica
    Table[Subfactorial[n]*n!, {n, 0, 15}] (* Zerinvary Lajos, Jul 10 2009 *)
  • Maxima
    A000166[0]:1$
    A000166[n]:=n*A000166[n-1]+(-1)^n$
      makelist(n!*A000166[n], n, 0, 12); /* Emanuele Munarini, Mar 01 2011 */
    
  • PARI
    d(n)=if(n<1, n==0, n*d(n-1)+(-1)^n);
    a(n)=d(n)*n!;
    vector(33,n,a(n-1))
    /* Joerg Arndt, May 28 2012 */
    
  • PARI
    {a(n) = if( n<2, n==0, n! * round(n! / exp(1)))}; /* Michael Somos, Jun 24 2018 */
    
  • Python
    A082491_list, m, x = [], 1, 1
    for n in range(10*2):
        x, m = x*n**2 + m, -(n+1)*m
        A082491_list.append(x) # Chai Wah Wu, Nov 03 2014
    
  • Scala
    val A082491_pairs: LazyList[BigInt && BigInt] =
      (BigInt(0), BigInt(1)) #::
      (BigInt(1), BigInt(0)) #::
      lift2 {
        case ((n, z), (_, y)) =>
          (n+2, (n+2)*(n+1)*((n+1)*z+y))
      } (A082491_pairs, A082491_pairs.tail)
    val A082491: LazyList[BigInt] =
      lift1(_._2)(A082491_pairs)
    /** Luc Duponcheel, Jan 25 2020 */

Formula

a(n) = n! * d(n) where d(n) = A000166(n).
a(n) = Sum_{k=0..n} binomial(n, k)^2 * (-1)^k * (n - k)!^2 * k!.
a(n+2) = (n+2)*(n+1) * ( a(n+1) + (n+1)*a(n) ).
a(n) ~ 2*Pi*n^(2*n+1)*exp(-2*n-1). - Ilya Gutkovskiy, Dec 04 2016

A230960 Boustrophedon transform of factorials, cf. A000142.

Original entry on oeis.org

1, 2, 5, 17, 73, 381, 2347, 16701, 134993, 1222873, 12279251, 135425553, 1627809401, 21183890469, 296773827547, 4453511170517, 71275570240417, 1211894559430065, 21816506949416611, 414542720924028441, 8291224789668806345, 174120672081098057341
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 05 2013

Keywords

Crossrefs

Programs

  • Haskell
    a230960 n = sum $ zipWith (*) (a109449_row n) a000142_list
    
  • Mathematica
    T[n_, k_] := (n!/k!) SeriesCoefficient[(1 + Sin[x])/Cos[x], {x, 0, n - k}];
    a[n_] := Sum[T[n, k] k!, {k, 0, n}];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Jul 02 2019 *)
  • Python
    from itertools import count, islice, accumulate
    def A230960_gen(): # generator of terms
        blist, m = tuple(), 1
        for i in count(1):
            yield (blist := tuple(accumulate(reversed(blist),initial=m)))[-1]
            m *= i
    A230960_list = list(islice(A230960_gen(),30)) # Chai Wah Wu, Jun 11 2022

Formula

a(n) = Sum_{k=0..n} A109449(n,k)*A000142(k).
E.g.f.: (tan(x)+sec(x))/(1-x) = (1- 12*x/(Q(0)+6*x+3*x^2))/(1-x), where Q(k) = 2*(4*k+1)*(32*k^2+16*k-x^2-6) - x^4*(4*k-1)*(4*k+7)/Q(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Nov 18 2013
a(n) ~ n! * (1+sin(1))/cos(1). - Vaclav Kotesovec, Jun 12 2015
a(n) = Sum_{k=0..n} (k+1) * A092580(n,k). - Alois P. Heinz, Apr 27 2023

A137986 Decimal expansion of the number whose Pierce expansion has the sequence of factorial numbers (A000142) as coefficients.

Original entry on oeis.org

4, 2, 0, 1, 0, 9, 9, 9, 3, 8, 8, 3, 4, 8, 7, 3, 4, 1, 7, 6, 1, 6, 5, 4, 5, 3, 7, 9, 4, 0, 0, 0, 9, 0, 3, 5, 9, 2, 8, 9, 1, 1, 2, 4, 7, 2, 1, 8, 6, 2, 5, 2, 4, 2, 0, 7, 4, 4, 5, 2, 5, 0, 5, 2, 5, 3, 8, 3, 5, 1, 0, 1, 5, 3, 7, 8, 1, 3, 5, 8, 7, 7, 5, 6, 1, 5, 3, 4, 7, 1, 0, 3, 5, 8, 4, 1, 9, 4, 5
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    P:=proc(n) local a,i,k; a:=0; k:=1; for i from 0 by 1 to n do k:=k*i!; a:=a+(-1)^i/k; print(evalf(a,100)); od; end: P(100);
  • Mathematica
    RealDigits[N[(Sum[(-1)^n*Product[1/((k - 1)!), {k, 1, n}], {n, 1, 250}]), 100]][[1]] (* G. C. Greubel, Jan 01 2017 *)

A137987 Decimal expansion of the inverse of the number whose Engel expansion has the sequence of factorial numbers (A000142) as coefficients.

Original entry on oeis.org

3, 8, 6, 5, 7, 2, 8, 5, 1, 1, 2, 0, 0, 8, 5, 1, 2, 8, 5, 3, 8, 8, 3, 3, 5, 3, 0, 4, 8, 7, 3, 9, 2, 3, 2, 6, 8, 0, 1, 1, 2, 7, 2, 9, 8, 5, 8, 9, 2, 7, 4, 6, 4, 6, 8, 8, 9, 2, 5, 2, 2, 1, 3, 4, 4, 0, 4, 1, 0, 1, 1, 7, 3, 4, 1, 4, 5, 8, 4, 0, 7, 3, 3, 2, 1, 0, 1, 3, 6, 7, 0, 3, 3, 5, 9, 3, 9, 4, 7
Offset: 0

Views

Author

Paolo P. Lava and Giorgio Balzarotti, Feb 26 2008, Apr 18 2008

Keywords

Crossrefs

Programs

  • Maple
    P:=proc(n) local a,i,k; a:=0; k:=1; for i from 0 by 1 to n do k:=k*i!; a:=a+1/k; print(evalf(1/a,100)); od; end: P(100);
  • Mathematica
    RealDigits[N[(1/Sum[Product[1/((k - 1)!), {k, 1, n}], {n, 1, 250}]), 100]][[1]] (* G. C. Greubel, Jan 02 2017 *)

Formula

Equals 1/A287013. - Amiram Eldar, Nov 19 2020
Showing 1-10 of 2943 results. Next