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

A047072 Array A read by diagonals: A(h,k)=number of paths consisting of steps from (0,0) to (h,k) such that each step has length 1 directed up or right and no step touches the line y=x unless x=0 or x=h.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 3, 2, 2, 3, 1, 1, 4, 5, 4, 5, 4, 1, 1, 5, 9, 5, 5, 9, 5, 1, 1, 6, 14, 14, 10, 14, 14, 6, 1, 1, 7, 20, 28, 14, 14, 28, 20, 7, 1, 1, 8, 27, 48, 42, 28, 42, 48, 27, 8, 1, 1, 9, 35, 75, 90, 42, 42, 90, 75, 35, 9, 1
Offset: 0

Views

Author

Keywords

Examples

			Array, A(n, k), begins as:
  1, 1,  1,  1,  1,   1,   1,   1, ...;
  1, 2,  1,  2,  3,   4,   5,   6, ...;
  1, 1,  2,  2,  5,   9,  14,  20, ...;
  1, 2,  2,  4,  5,  14,  28,  48, ...;
  1, 3,  5,  5, 10,  14,  42,  90, ...;
  1, 4,  9, 14, 14,  28,  42, 132, ...;
  1, 5, 14, 28, 42,  42,  84, 132, ...;
  1, 6, 20, 48, 90, 132, 132, 264, ...;
Antidiagonals, T(n, k), begins as:
  1;
  1,  1;
  1,  2,  1;
  1,  1,  1,  1;
  1,  2,  2,  2,  1;
  1,  3,  2,  2,  3,  1;
  1,  4,  5,  4,  5,  4,  1;
  1,  5,  9,  5,  5,  9,  5,  1;
  1,  6, 14, 14, 10, 14, 14,  6,  1;
		

Crossrefs

The following are all versions of (essentially) the same Catalan triangle: A009766, A030237, A033184, A059365, A099039, A106566, A130020, A047072.

Programs

  • Magma
    b:= func< n | n eq 0 select 1 else 2*Catalan(n-1) >;
    function A(n,k)
      if k eq n then return b(n);
      elif k gt n then return Binomial(n+k-1, n) - Binomial(n+k-1, n-1);
      else return Binomial(n+k-1, k) - Binomial(n+k-1, k-1);
      end if; return A;
    end function;
    // [[A(n,k): k in [0..12]]: n in [0..12]];
    T:= func< n,k | A(n-k, k) >;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 13 2022
    
  • Mathematica
    A[, 0]= 1; A[0, ]= 1; A[h_, k_]:= A[h, k]= If[(k-1>h || k-1Jean-François Alcover, Mar 06 2019 *)
  • SageMath
    def A(n,k):
        if (k==n): return 2*catalan_number(n-1) + 2*int(n==0)
        elif (k>n): return binomial(n+k-1, n) - binomial(n+k-1, n-1)
        else: return binomial(n+k-1, k) - binomial(n+k-1, k-1)
    def T(n,k): return A(n-k, k)
    # [[A(n,k) for k in range(12)] for n in range(12)]
    flatten([[T(n,k) for k in range(n+1)] for n in range(12)]) # G. C. Greubel, Oct 13 2022

Formula

A(n, n) = 2*[n=0] - A002420(n),
A(n, n+1) = 2*A000108(n-1), n >= 1.
From G. C. Greubel, Oct 13 2022: (Start)
T(n, n-1) = A000027(n-2) + 2*[n<3], n >= 1.
T(n, n-2) = A000096(n-4) + 2*[n<5], n >= 2.
T(n, n-3) = A005586(n-6) + 4*[n<7] - 2*[n=3], n >= 3.
T(2*n, n) = 2*A000108(n-1) + 3*[n=0].
T(2*n-1, n-1) = T(2*n+1, n+1) = A000180(n).
T(3*n, n) = A025174(n) + [n=0]
Sum_{k=0..n} T(n, k) = 2*A063886(n-2) + [n=0] - 2*[n=1]
Sum_{k=0..n} (-1)^k * T(n, k) = A000007(n).
Sum_{k=0..floor(n/2)} T(n, k) = A047079(n). (End)

A001907 Expansion of e.g.f. exp(-x)/(1-4*x).

Original entry on oeis.org

1, 3, 25, 299, 4785, 95699, 2296777, 64309755, 2057912161, 74084837795, 2963393511801, 130389314519243, 6258687096923665, 325451729040030579, 18225296826241712425, 1093517809574502745499, 69985139812768175711937, 4758989507268235948411715
Offset: 0

Views

Author

Keywords

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 83.
  • 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

Column k=4 of A320032.

Programs

  • Magma
    I:=[3,25]; [1] cat [n le 2 select I[n]  else (4*n-1)*Self(n-1)+4*(n-1)*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Aug 08 2015
  • Maple
    f:= gfun:-rectoproc({a(n) = (4*n-1)*a(n-1) + 4*(n-1)*a(n-2), a(0)=1, a(1)=3},a(n), remember):
    map(f, [$0..30]); # Robert Israel, Aug 07 2015
  • Mathematica
    With[{nn=20},CoefficientList[Series[Exp[-x]/(1-4x),{x,0,nn}], x] Range[0,nn]!] (* or *) Table[Sum[(-1)^(n+k) Binomial[n,k]k! 4^k, {k,0,n}], {n,0,20}](* Harvey P. Dale, Oct 25 2011 *)
    Join[{1}, RecurrenceTable[{a[1] == 3, a[2] == 25, a[n] == (4 n - 1) a[n-1] + 4(n - 1) a[n-2]}, a, {n, 20}]] (* Vincenzo Librandi, Aug 08 2015 *)
  • PARI
    a(n)=sum(k=0,n,(-1)^(n+k)*binomial(n,k)*k!*4^k)
    
  • PARI
    x = 'x+O('x^33); Vec(serlaplace(exp(-x)/(1-4*x))) \\ Gheorghe Coserea, Aug 06 2015
    

Formula

a(n) = Sum_{k=0..n} (-1)^(n+k)*C(n,k)*k!*4^k. - Ralf Stephan, May 22 2004
Recurrence: a(n) = (4*n-1)*a(n-1) + 4*(n-1)*a(n-2). - Vaclav Kotesovec, Aug 16 2013
a(n) ~ n! * exp(-1/4)*4^n. - Vaclav Kotesovec, Aug 16 2013
E.g.f. A(x) = exp(-x)/(1-4x) satisfies (1-4x)A' - (3+4x)A = 0. - Gheorghe Coserea, Aug 06 2015
a(n) = exp(-1/4)*4^n*Gamma(n+1,-1/4), where Gamma is the incomplete Gamma function. - Robert Israel, Aug 07 2015
a(0) = 1; a(n) = Sum_{k=1..n} binomial(n,k) * (4*k - 1) * a(n-k). - Ilya Gutkovskiy, Jan 17 2020

Extensions

More terms from Ralf Stephan, May 22 2004
Typo fixed by Charles R Greathouse IV, Oct 28 2009
Name clarified by Ilya Gutkovskiy, Jan 17 2020

A320032 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals, where column k is the expansion of the e.g.f. exp(-x)/(1 - k*x).

Original entry on oeis.org

1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 2, 5, 2, 1, 1, 3, 13, 29, 9, -1, 1, 4, 25, 116, 233, 44, 1, 1, 5, 41, 299, 1393, 2329, 265, -1, 1, 6, 61, 614, 4785, 20894, 27949, 1854, 1, 1, 7, 85, 1097, 12281, 95699, 376093, 391285, 14833, -1, 1, 8, 113, 1784, 26329, 307024, 2296777, 7897952, 6260561, 133496, 1
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 03 2018

Keywords

Comments

For n > 0 and k > 0, A(n,k) gives the number of derangements of the generalized symmetric group S(k,n), which is the wreath product of Z_k by S_n. - Peter Kagey, Apr 07 2020

Examples

			E.g.f. of column k: A_k(x) = 1 + (k - 1)*x/1! + (2*k^2 - 2*k + 1)*x^2/2! + (6*k^3 - 6*k^2 + 3*k - 1)*x^3/3! + (24*k^4 - 24*k^3 + 12*k^2 - 4*k + 1)*x^4/4! + ...
Square array begins:
   1,   1,     1,      1,      1,       1,  ...
  -1,   0,     1,      2,      3,       4,  ...
   1,   1,     5,     13,     25,      41,  ...
  -1,   2,    29,    116,    299,     614,  ...
   1,   9,   233,   1393,   4785,   12281,  ...
  -1,  44,  2329,  20894,  95699,  307024,  ...
		

Crossrefs

Columns k=0..5 give A033999, A000166, A000354, A000180, A001907, A001908.
Main diagonal gives A319392.
Cf. A320031.

Programs

  • Maple
    A:= proc(n, k) option remember;
         `if`(n=0, 1, k*n*A(n-1, k)+(-1)^n)
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, May 07 2020
  • Mathematica
    Table[Function[k, n! SeriesCoefficient[Exp[-x]/(1 - k x), {x, 0, n}]][j - n], {j, 0, 10}, {n, 0, j}] // Flatten
    Table[Function[k, (-1)^n HypergeometricPFQ[{1, -n}, {}, k]][j - n], {j, 0, 10}, {n, 0, j}] // Flatten

Formula

E.g.f. of column k: exp(-x)/(1 - k*x).
A(n,k) = Sum_{j=0..n} (-1)^(n-j)*binomial(n,j)*j!*k^j.
A(n,k) = (-1)^n*2F0(1,-n; ; k).

A375446 Triangle read by rows: T(n, k) = n! * 3^k * hypergeom([-k], [-n], -1/3).

Original entry on oeis.org

1, 1, 2, 2, 5, 13, 6, 16, 43, 116, 24, 66, 182, 503, 1393, 120, 336, 942, 2644, 7429, 20894, 720, 2040, 5784, 16410, 46586, 132329, 376093, 5040, 14400, 41160, 117696, 336678, 963448, 2758015, 7897952, 40320, 115920, 333360, 958920, 2759064, 7940514, 22858094, 65816267, 189550849
Offset: 0

Views

Author

Detlef Meya, Aug 15 2024

Keywords

Examples

			Triangle starts:
[0] 1,
[1] 1, 2,
[2] 2, 5, 13,
[3] 6, 16, 43, 116,
[4] 24, 66, 182, 503, 1393,
[5] 120, 336, 942, 2644, 7429, 20894,
[6] 720, 2040, 5784, 16410, 46586, 132329, 376093,
[7] 5040, 14400, 41160, 117696, 336678, 963448, 2758015, 7897952,
...
		

Crossrefs

Cf. A375447, A000142, A000180 (diagonal).

Programs

  • Mathematica
    T[n_, k_] := (-1)^k*Sum[(-3)^(k - j)*Binomial[k, k - j]*(n - j)!, {j, 0, k}];
    Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten

Formula

T(n, k) = (-1)^k*Sum_{j=0..k} (-3)^(k - j)*binomial(k, k - j)*(n - j)!.

A319392 a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n,k)*k!*n^k.

Original entry on oeis.org

1, 0, 5, 116, 4785, 307024, 28435285, 3598112580, 596971515329, 125802906617600, 32834740225688901, 10399056510149276980, 3929349957207906673585, 1746371472945523953503376, 901944505258819679842017365, 535692457387043907059336566724, 362573376628272441934460817960705
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 18 2018

Keywords

Crossrefs

Main diagonal of A320032.

Programs

  • Maple
    b:= proc(n, k) option remember;
         `if`(n=0, 1, k*n*b(n-1, k)+(-1)^n)
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..17);  # Alois P. Heinz, May 07 2020
  • Mathematica
    Join[{1}, Table[Sum[(-1)^(n - k) Binomial[n, k] k! n^k, {k, 0, n}], {n, 16}]]
    Table[n! SeriesCoefficient[Exp[-x]/(1 - n x), {x, 0, n}], {n, 0, 16}]
    Table[(-1)^n HypergeometricPFQ[{1, -n}, {}, n], {n, 0, 16}]
  • PARI
    a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n,k)*k!*n^k); \\ Michel Marcus, Sep 18 2018

Formula

a(n) = n! * [x^n] exp(-x)/(1 - n*x).
a(n) = exp(-1/n)*n^n*Gamma(n+1,-1/n) for n > 0, where Gamma(a,x) is the incomplete gamma function.
a(n) ~ n! * n^n. - Vaclav Kotesovec, Jun 09 2019

A337153 a(n) = 3^n * (n!)^2 * Sum_{k=0..n} 1 / ((-3)^k * (k!)^2).

Original entry on oeis.org

1, 2, 25, 674, 32353, 2426474, 262059193, 38522701370, 7396358663041, 1797315155118962, 539194546535688601, 195727620392454962162, 84554332009540543653985, 42869046328837055632570394, 25206999241356188711951391673, 17014724487915427380567189379274, 13067308406719048228275601443282433
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 27 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[3^n n!^2 Sum[1/((-3)^k k!^2), {k, 0, n}], {n, 0, 16}]
    nmax = 16; CoefficientList[Series[BesselJ[0, 2 Sqrt[x]]/(1 - 3 x), {x, 0, nmax}], x] Range[0, nmax]!^2
  • PARI
    a(n) = 3^n * (n!)^2 * sum(k=0, n, 1 / ((-3)^k * (k!)^2)); \\ Michel Marcus, Jan 28 2021

Formula

Sum_{n>=0} a(n) * x^n / (n!)^2 = BesselJ(0,2*sqrt(x)) / (1 - 3*x).
a(0) = 1; a(n) = 3 * n^2 * a(n-1) + (-1)^n.

A337552 a(0) = 1; a(n) = Sum_{k=1..n} binomial(n,k) * (3*k-2) * a(n-k).

Original entry on oeis.org

1, 1, 6, 37, 330, 3613, 47652, 732625, 12875118, 254540413, 5591435136, 135108218353, 3561467337546, 101704047315037, 3127751183515020, 103059820083026449, 3622223857996975110, 135266462416766669917, 5348457650664454581240, 223227700948792985989777
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 31 2020

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[n_] := a[n] = Sum[Binomial[n, k] (3 k - 2) a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 19}]
    nmax = 19; CoefficientList[Series[1/(Exp[x] (2 - 3 x) - 1), {x, 0, nmax}], x] Range[0, nmax]!
  • PARI
    seq(n)={Vec(serlaplace(1 / (exp(x + O(x*x^n)) * (2 - 3*x) - 1)))} \\ Andrew Howroyd, Aug 31 2020

Formula

E.g.f.: 1 / (exp(x) * (2 - 3*x) - 1).
a(n) ~ n! * c / ((1-c) * (2/3 - c)^(n+1)), where c = -LambertW(-exp(-2/3)/3). - Vaclav Kotesovec, Aug 31 2020
Showing 1-7 of 7 results.