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

A094793 a(n) = (1/n!)*A001688(n).

Original entry on oeis.org

9, 53, 181, 465, 1001, 1909, 3333, 5441, 8425, 12501, 17909, 24913, 33801, 44885, 58501, 75009, 94793, 118261, 145845, 178001, 215209, 257973, 306821, 362305, 425001, 495509, 574453, 662481, 760265, 868501, 987909, 1119233, 1263241
Offset: 0

Views

Author

Benoit Cloitre, Jun 11 2004

Keywords

Comments

Number of injections from {1,2,3,4} to {1,2,...,n} with no fixed points. - Fiona T. Brunk (fbrunk(AT)mcs.st-and.ac.uk), May 23 2006
In general (cf. A094792, A094794, A094795, etc.), the number of injections [k] -> [n] with no fixed points is given by Sum_{i=0..k} (-1)^i*binomial(k,i)*(n-i)!/(n-k)!, which is equal to (1/n!)*f_k(n) where f_k(n) gives the k-th differences of factorial numbers. - Fiona T. Brunk (fbrunk(AT)mcs.st-and.ac.uk), May 23 2006

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5,-10,10,-5,1},{9,53,181,465,1001},40] (* Harvey P. Dale, May 23 2016 *)

Formula

a(n) = n^4 + 6*n^3 + 17*n^2 + 20*n + 9.
a(n) = Sum_{i=0..4} (-1)^i*binomial(4,i)*(n-i)!/(n-4)!. - Fiona T. Brunk (fbrunk(AT)mcs.st-and.ac.uk), May 23 2006
G.f.: -(x^4+6*x^2+8*x+9) / (x-1)^5. - Colin Barker, Jun 16 2013
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Fung Lam, Apr 17 2014
P-recursive: n*a(n) = (n+5)*a(n-1) - a(n-2) with a(0) = 9 and a(1) = 53. Cf. A094791. - Peter Bala, Jul 25 2021

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

A095177 E.g.f.: exp(x)/(1-x)^5.

Original entry on oeis.org

1, 6, 41, 316, 2721, 25946, 271801, 3105936, 38474561, 513796366, 7360674441, 112632827396, 1833790646881, 31656637715106, 577636838177561, 11109543835539736, 224635867973671041, 4764236394052127126
Offset: 0

Views

Author

Philippe Deléham, Jun 20 2004

Keywords

Comments

Sum_{k = 0..n} A094816(n,k)*x^k give A000522(n), A001339(n), A082030(n), A095000(n) for x = 1, 2, 3, 4 respectively.
From Peter Bala, Jul 10 2008: (Start)
a(n) is a difference divisibility sequence, that is, the difference a(n) - a(m) is divisible by n - m for all n and m (provided n is not equal to m). See A000522 for further properties of difference divisibility sequences.
Recurrence relation: a(0) = 1, a(1) = 6, a(n) = (n+5)*a(n-1) - (n-1)*a(n-2) for n >= 2. Let p_4(n) = n^4+2*n^3+5*n^2+1 = n^(4)-4*n^(3)+6*n^(2)-4*n^(1)+1, where n^(k) denotes the rising factorial n*(n+1)*...*(n+k-1). The polynomial p_4(n) is an example of a Poisson-Charlier polynomial c_k(x;a) at k = 4, x = -n and a = -1.
The sequence b(n) := n!*p_4(n+1) = A001688(n) satisfies the same recurrence as a(n) but with the initial conditions b(0) = 9, b(1) = 53. This leads to the finite continued fraction expansion expansion a(n)/b(n) = 1/(9-1/(6-1/(7-2/(8-...-(n-1)/(n+5))))).
Lim n -> infinity a(n)/b(n) = e/24 = 1/(9-1/(6-1/(7-2/(8-...-n/((n+6)-...))))).
a(n) = b(n) * sum {k = 0..n} 1/(k!*p_4(k)*p_4(k+1)) - since the rhs satisfies the above recurrence with the same initial conditions. Hence e = 24 * sum {k = 0..inf} 1/(k!*p_4(k)p_4(k+1)).
For sequences satisfying the more general recurrence a(n) = (n+1+r)*a(n-1) - (n-1)*a(n-2), which yield series acceleration formulas for e/r! that involve the Poisson-Charlier polynomials c_r(-n;-1), refer to A000522 (r = 0), A001339 (r=1), A082030 (r=2), A095000 (r=3). (End)

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[Exp[x]/(1-x)^5, {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Jun 21 2013 *)
    Table[HypergeometricPFQ[{5, -n}, {}, -1], {n, 0, 20}] (* Benedict W. J. Irwin, May 27 2016 *)
  • PARI
    a(n) = sum(k=0,n, binomial(n, k)*(k+4)!/4! ); \\ Joerg Arndt, Apr 22 2013

Formula

a(n) = Sum_{k = 0..n} A094816(n, k)*5^k.
a(n) = Sum_{k=0..n} binomial(n, k)*(k+4)!/4!.
G.f.: 1/Q(0), where Q(k) = 1 - x - x*(k+5)/(1 - x*(k+1)/Q(k+1)); (continued fraction). - Sergei N. Gladkovskii, Apr 22 2013
a(n) ~ n! *exp(1)*n^4/24. - Vaclav Kotesovec, Jun 21 2013
a(n) = 2F0(5,-n;;-1). - Benedict W. J. Irwin, May 27 2016
First-order recurrence: P(n-1)*a(n) = n*P(n)*a(n-1) + 1 with a(0) = 1, where P(n) = n^4 + 6*n^3 + 17*n^2 + 20*n + 9 = A094793(n). - Peter Bala, Jul 26 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

A094794 a(n) = (1/n!)*A001689(n).

Original entry on oeis.org

44, 309, 1214, 3539, 8544, 18089, 34754, 61959, 104084, 166589, 256134, 380699, 549704, 774129, 1066634, 1441679, 1915644, 2506949, 3236174, 4126179, 5202224, 6492089, 8026194, 9837719, 11962724, 14440269, 17312534, 20624939, 24426264
Offset: 0

Views

Author

Benoit Cloitre, Jun 11 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n^5+10n^4+45n^3+100n^2+109n+44,{n,0,30}] (* or *) LinearRecurrence[ {6,-15,20,-15,6,-1},{44,309,1214,3539,8544,18089},30]
  • PARI
    a(n)=n^5+10*n^4+45*n^3+100*n^2+109*n+44 \\ Charles R Greathouse IV, Oct 16 2015

Formula

a(n) = n^5 + 10*n^4 + 45*n^3 + 100*n^2 + 109*n + 44.
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6), with a(0)=44, a(1)=309, a(2)=1214, a(3)=3539, a(4)=8544, a(5)=18089. - Harvey P. Dale, Jul 25 2012
G.f.: (x^5 + 10*x^3 + 20*x^2 + 45*x + 44) / (x-1)^6. - Colin Barker, Jun 15 2013
P-recursive: n*a(n) = (n+6)*a(n-1) - a(n-2) with a(0) = 44 and a(1) = 309. Cf. A094791 and A096307. - Peter Bala, Jul 25 2021

A094792 a(n) = (1/n!)*A001565(n).

Original entry on oeis.org

2, 11, 32, 71, 134, 227, 356, 527, 746, 1019, 1352, 1751, 2222, 2771, 3404, 4127, 4946, 5867, 6896, 8039, 9302, 10691, 12212, 13871, 15674, 17627, 19736, 22007, 24446, 27059, 29852, 32831, 36002, 39371, 42944, 46727, 50726, 54947, 59396, 64079
Offset: 0

Views

Author

Benoit Cloitre, Jun 11 2004

Keywords

Comments

Number of injections from {1,2,3} to {1,2,...,n} with no fixed points. - Fiona T. Brunk (fbrunk(AT)mcs.st-and.ac.uk), May 23 2006

Crossrefs

Programs

Formula

a(n) = n^3 + 3*n^2 + 5*n + 2.
a(n) = Sum_{i=0..3} (-1)^i*binomial(3,i)*(n-i)!/(n-3)!. - Fiona T. Brunk (fbrunk(AT)mcs.st-and.ac.uk), May 23 2006
G.f.: (x^3+3*x+2) / (x-1)^4. - Colin Barker, Jun 15 2013
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Fung Lam, Apr 17 2014
P-recursive: n*a(n) = (n+4)*a(n-1) - a(n-2) with a(0) = 2 and a(1) = 11. Cf. A094791. - Peter Bala, Jul 25 2021

A094795 a(n) = (1/n!)*A023043(n).

Original entry on oeis.org

265, 2119, 9403, 30637, 81901, 190435, 398959, 770713, 1395217, 2394751, 3931555, 6215749, 9513973, 14158747, 20558551, 29208625, 40702489, 55744183, 75161227, 99918301, 131131645, 170084179, 218241343, 277267657, 349044001, 435685615
Offset: 0

Views

Author

Benoit Cloitre, Jun 11 2004

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{265,2119,9403,30637,81901,190435,398959},30] (* Harvey P. Dale, Aug 29 2023 *)

Formula

a(n) = n^6 + 15*n^5 + 100*n^4 + 355*n^3 + 694*n^2 + 689*n + 265.
G.f.: -(265 + 264*x + 135*x^2 + 40*x^3 + 15*x^4 + x^6)/(x-1)^7. - R. J. Mathar, Nov 15 2019
P-recursive: n*a(n) = (n+7)*a(n-1) - a(n-2) with a(0) = 265 and a(1) = 2119. Cf. A094791. - Peter Bala, Jul 25 2021

A306512 Number A(n,k) of permutations p of [n] having no index i with |p(i)-i| = k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 9, 1, 1, 2, 3, 5, 44, 1, 1, 2, 6, 9, 21, 265, 1, 1, 2, 6, 14, 34, 117, 1854, 1, 1, 2, 6, 24, 53, 176, 792, 14833, 1, 1, 2, 6, 24, 78, 265, 1106, 6205, 133496, 1, 1, 2, 6, 24, 120, 362, 1554, 8241, 55005, 1334961
Offset: 0

Views

Author

Alois P. Heinz, Feb 20 2019

Keywords

Examples

			A(4,0) = 9: 2143, 2341, 2413, 3142, 3412, 3421, 4123, 4312, 4321.
A(4,1) = 5: 1234, 1432, 3214, 3412, 4231.
A(4,2) = 9: 1234, 1243, 1324, 2134, 2143, 2341, 4123, 4231, 4321.
Square array A(n,k) begins:
     1,   1,    1,    1,    1,    1,    1,    1, ...
     0,   1,    1,    1,    1,    1,    1,    1, ...
     1,   1,    2,    2,    2,    2,    2,    2, ...
     2,   2,    3,    6,    6,    6,    6,    6, ...
     9,   5,    9,   14,   24,   24,   24,   24, ...
    44,  21,   34,   53,   78,  120,  120,  120, ...
   265, 117,  176,  265,  362,  504,  720,  720, ...
  1854, 792, 1106, 1554, 2119, 2790, 3720, 5040, ...
		

Crossrefs

Columns k=0-3 give: A000166, A078480, A306523, A324365.
A(n+2j,n+j) (j=0..5) give: A000142, A001564, A001688, A023043, A023045, A023047.
A(2n,n) gives A306535.
Cf. A306506.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(k>=n, n!, LinearAlgebra[
          Permanent](Matrix(n, (i, j)-> `if`(abs(i-j)=k, 0, 1))))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);
    # second Maple program:
    b:= proc(s, k) option remember; (n-> `if`(n=0, 1, add(
          `if`(abs(i-n)=k, 0, b(s minus {i}, k)), i=s)))(nops(s))
        end:
    A:= (n, k)-> `if`(k>=n, n!, b({$1..n}, k)):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    A[n_, k_] := If[k > n, n!, Permanent[Table[If[Abs[i-j] == k, 0, 1], {i, 1, n}, {j, 1, n}]]]; A[0, 0] = 1;
    Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 05 2021, from first Maple program *)
    b[s_, k_] := b[s, k] = With[{n = Length[s]}, If[n == 0, 1, Sum[
         If[Abs[i-n] == k, 0, b[s ~Complement~ {i}, k]], {i, s}]]];
    A[n_, k_] := If[k >= n, n!, b[Range@n, k]];
    Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Sep 01 2021, from second Maple program *)

Formula

A(n,k) = n! - A306506(n,k).
A(n,n+i) = n! for i >= 0.

A023044 7th differences of factorial numbers.

Original entry on oeis.org

1854, 16687, 165016, 1781802, 20886576, 264398280, 3597143040, 52370755920, 812752093440, 13397819541120, 233845982899200, 4309095479673600, 83609603781580800, 1704092533657113600, 36403110891295948800
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Differences[Range[0, 25]!, 7] (* Paolo Xausa, May 26 2025 *)

A061312 Triangle T[n,m]: T[n,-1] = 0; T[0,0] = 0; T[n,0] = n*n!; T[n,m] = T[n,m-1] - T[n-1,m-1].

Original entry on oeis.org

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

Views

Author

Wouter Meeussen, Jun 06 2001

Keywords

Comments

Appears in the (n,k)-matching problem A076731. [Johannes W. Meijer, Jul 27 2011]

Examples

			0,
1, 1,
4, 3, 2,
18, 14, 11, 9,
96, 78, 64, 53, 44,
600, 504, 426, 362, 309, 265,
4320, 3720, 3216, 2790, 2428, 2119, 1854,
35280, 30960, 27240, 24024, 21234, 18806, 16687, 14833,
		

Crossrefs

Cf. A061018.
From Johannes W. Meijer, Jul 27 2011: (Start)
The row sums equal A193465. (End)

Programs

  • Magma
    [[(&+[(-1)^j*Binomial(k+1,j)*Factorial(n-j+1): j in [0..k+1]]): k in [0..n]]: n in [0..20]]; // G. C. Greubel, Aug 13 2018
  • Maple
    A061312 := proc(n,m): add(((-1)^j)*binomial(m+1,j)*(n+1-j)!, j=0..m+1) end: seq(seq(A061312(n,m), m=0..n), n=0..7); # Johannes W. Meijer, Jul 27 2011
  • Mathematica
    T[n_, k_]:= Sum[(-1)^j*Binomial[k + 1, j]*(n + 1 - j)!, {j, 0, k + 1}]; Table[T[n, k], {n, 0, 100}, {k, 0, n}] // Flatten  (* G. C. Greubel, Aug 13 2018 *)
  • PARI
    for(n=0,20, for(k=0,n, print1(sum(j=0,k+1, (-1)^j*binomial(k+1,j) *(n-j+1)!), ", "))) \\ G. C. Greubel, Aug 13 2018
    

Formula

T[n,m] = T[n,m-1]-T[n-1,m-1] with T[n,-1] = 0 and T[n,0] = A001563(n) = n*n!
T(n,m) = sum(((-1)^j)*binomial(m+1,j)*(n+1-j)!, j=0..m+1) [Johannes W. Meijer, Jul 27 2011]
Showing 1-10 of 12 results. Next