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 21-30 of 58 results. Next

A187251 Number of permutations of [n] having no cycle with 3 or more alternating runs (it is assumed that the smallest element of a cycle is in the first position).

Original entry on oeis.org

1, 1, 2, 6, 22, 94, 460, 2532, 15420, 102620, 739512, 5729192, 47429896, 417429800, 3888426512, 38192416048, 394239339792, 4264424937488, 48212317486112, 568395755184224, 6973300915138656, 88860103591344864, 1174131206436335296, 16061756166912244800
Offset: 0

Views

Author

Emeric Deutsch, Mar 08 2011

Keywords

Comments

a(n) = A187250(n,0).
It appears that a(n) = A216964(n,1), for n>0. - Michel Marcus, May 17 2013.
The above comment is correct. Let b(n) be the n-th element of the first column of the triangle in A216964. By definition, b(n) is the number of permutations of [n] with no cyclic valleys. Recall that alternating runs of permutations are monotonically increasing or decreasing subsequences. In other words, b(n) is the number of permutations of [n] with the restriction that every cycle has at most two alternating runs, so b(n) = A187251(n) = a(n). - Shi-Mei Ma, May 18 2013.

Examples

			a(4)=22 because only the permutations 3421=(1324) and 4312=(1423) have cycles with more than 2 alternating runs.
		

Crossrefs

Programs

  • Maple
    g := exp((2*z-1+exp(2*z))*1/4): gser := series(g, z = 0, 28): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 23);
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1, add(
          a(n-j)*binomial(n-1, j-1)*ceil(2^(j-2)), j=1..n))
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, May 30 2021
  • Mathematica
    nmax = 20; CoefficientList[Series[E^((2*x-1+E^(2*x))/4), {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, Apr 17 2020 *)
  • Maxima
    a(n):=n!*sum(2^(n-2*k)*sum(binomial(k,j)*stirling2(n-k+j,j)*j!/(n-k+j)!,j,0,k)/k!,k,1,n); /* Vladimir Kruchinin, Apr 25 2011 */
    
  • PARI
    x='x+O('x^66); Vec(serlaplace(exp( (2*x-1+exp(2*x))/4 ))) /* Joerg Arndt, Apr 26 2011 */
    
  • PARI
    lista(m) = {P = x*y; for (n=1, m, M = subst(P, x, 1); M = subst(M, y, 1); print1(polcoeff(M, 0, q), ", "); P = (n*q+x*y)*P + 2*q*(1-q)*deriv(P, q)+ 2*x*(1-q)*deriv(P, x)+ (1-2*y+q*y)*deriv(P, y); ); } \\ (adapted from PARI prog in A216964) \\ Michel Marcus, May 17 2013

Formula

E.g.f.: exp( (2*z-1+exp(2*z))/4 ).
For n>=1: a(n)=n!*sum(k=1..n, 2^(n-2*k)*sum(j=0..k, binomial(k,j)*stirling2(n-k+j,j)*j!/(n-k+j)!)/k!); [From Vladimir Kruchinin, Apr 25 2011]
G.f.: 1/Q(0) where Q(k) = 1 - x*k - x/(1 - x*(k+1)/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Mar 07 2013
G.f.: 1/Q(0) where Q(k) = 1 - x*(2*k+1) - m*x^2*(k+1)/Q(k+1) and m=1 (continued fraction); setting m=2 gives A004211, m=4 gives A124311 without signs. - Sergei N. Gladkovskii, Sep 26 2013
G.f.: T(0)/(1-x), where T(k) = 1 - x^2*(k+1)/( x^2*(k+1) - (1-x-2*x*k)*(1-3*x-2*x*k)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 25 2013
Sum_{k=0..n} binomial(n,k) * a(k) * a(n-k) = A007405(n). - Vaclav Kotesovec, Apr 17 2020
a(n) = Sum_{j=1..n} a(n-j)*binomial(n-1,j-1)*ceiling(2^(j-2)) for n > 0, a(0) = 1. - Alois P. Heinz, May 30 2021

A351143 G.f. A(x) satisfies: A(x) = 1 + x^2 * A(x/(1 - 2*x)) / (1 - 2*x).

Original entry on oeis.org

1, 0, 1, 2, 5, 16, 61, 258, 1177, 5776, 30537, 173394, 1050045, 6732608, 45459493, 322141106, 2390075249, 18525967328, 149684238801, 1257802518754, 10969260208565, 99100423076912, 926030783479629, 8937741026924450, 88988433270106249, 912906193294355952
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 02 2022

Keywords

Comments

Shifts 2 places left under 2nd-order binomial transform.

Crossrefs

Programs

  • Maple
    bintr:= proc(p) local b;
              b:= proc(n) option remember; add(p(k)*binomial(n, k), k=0..n) end
            end:
    b:= (bintr@@2)(a):
    a:= n-> `if`(n<2, 1-n, b(n-2)):
    seq(a(n), n=0..25);  # Alois P. Heinz, Apr 07 2025
  • Mathematica
    nmax = 25; A[] = 0; Do[A[x] = 1 + x^2 A[x/(1 - 2 x)]/(1 - 2 x) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    a[0] = 1; a[1] = 0; a[n_] := a[n] = Sum[Binomial[n - 2, k] 2^k a[n - k - 2], {k, 0, n - 2}]; Table[a[n], {n, 0, 25}]
    (* another program *)
    B[x_] := BesselK[1, 1]*BesselI[0, Exp[x]] + BesselI[1, 1]*BesselK[0, Exp[x]];
    a[n_] := SeriesCoefficient[FullSimplify[Series[B[x], {x, 0, n}]], n] n!
    Table[a[n], {n, 0, 30}] (* Ven Popov, Apr 25 2025 *)

Formula

a(0) = 1, a(1) = 0; a(n) = Sum_{k=0..n-2} binomial(n-2,k) * 2^k * a(n-k-2).
E.g.f.: BesselK(1, 1)*BesselI(0, exp(x)) + BesselI(1, 1)*BesselK(0, exp(x)). - Ven Popov, Apr 25 2025

A154602 Exponential Riordan array [exp(sinh(x)*exp(x)), sinh(x)*exp(x)].

Original entry on oeis.org

1, 1, 1, 3, 4, 1, 11, 19, 9, 1, 49, 104, 70, 16, 1, 257, 641, 550, 190, 25, 1, 1539, 4380, 4531, 2080, 425, 36, 1, 10299, 32803, 39515, 22491, 6265, 833, 49, 1, 75905, 266768, 365324, 247072, 87206, 16016, 1484, 64, 1, 609441, 2337505, 3575820, 2792476, 1192086, 281190, 36204, 2460, 81, 1
Offset: 0

Views

Author

Paul Barry, Jan 12 2009

Keywords

Comments

Triangle T(n,k), read by rows, given by [1,2,1,4,1,6,1,8,1,10,1,12,1,...] DELTA [1,0,1,0,1,0,1,0,1,0,1,0,1,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Feb 02 2009

Examples

			Triangle begins
     1;
     1,    1;
     3,    4,    1;
    11,   19,    9,    1;
    49,  104,   70,   16,   1;
   257,  641,  550,  190,  25,  1;
  1539, 4380, 4531, 2080, 425, 36, 1;
Production matrix of this array is
  1,  1,
  2,  3,  1,
  0,  4,  5,  1,
  0,  0,  6,  7,  1,
  0,  0,  0,  8,  9,  1,
  0,  0,  0,  0, 10, 11,  1
with generating function exp(t*x)*(1+t)*(1+2*x).
		

Crossrefs

Columns k=0..3 give A000007, A383203, A383204, A383205.
Cf. A004211 (first column), A256893.
Sums include: A000007 (alternating sign row), A055882 (row sums).

Programs

  • Magma
    A154602:= func< n,k | (&+[2^(n-j)*Binomial(j,k)*StirlingSecond(n,j): j in [k..n]]) >;
    [A154602(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Sep 19 2024
    
  • Maple
    A154602 := (n, k) -> add(2^(n-j) * binomial(j, k) * Stirling2(n, j), j = k..n): for n from 0 to 6 do seq(A154602(n, k), k = 0..n) od; # Peter Luschny, Dec 13 2022
  • Mathematica
    (* The function RiordanArray is defined in A256893. *)
    RiordanArray[Exp[Sinh[#] Exp[#]]&, Sinh[#] Exp[#]&, 10, True] // Flatten (* Jean-François Alcover, Jul 19 2019 *)
  • SageMath
    def A154602(n,k): return sum(2^(n-j)*binomial(j,k)* stirling_number2(n,j) for j in range(k,n+1))
    flatten([[A154602(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Sep 19 2024

Formula

T(n, 0) = A004211(n).
Sum_{k=0..n} T(n, k) = A055882(n) (row sums).
From Peter Bala, Jun 15 2009: (Start)
T(n,k) = Sum_{i = k..n} 2^(n-i)*binomial(i,k)*Stirling2(n,i).
E.g.f.: exp((t+1)/2*(exp(2*x)-1)) = 1 + (1+t)*x + (3+4*t+t^2)*x^2/2! + ....
Row generating polynomials R_n(x):
R_n(x) = 2^n*Bell(n,(x+1)/2), where Bell(n,x) = Sum_{k = 0..n} Stirling2(n, k)*x^k denotes the n-th Bell polynomial.
Recursion:
R(n+1,x) = (x+1)*(R_n(x) + 2*d/dx(R_n(x))).
(End)
Recurrence: T(n,k) = 2*(k+1)*T(n-1,k+1) + (2*k+1)*T(n-1,k) + T(n-1,k-1). - Emanuele Munarini, Apr 14 2020
Sum_{k=0..n} (-1)^k * T(n, k) = A000007(n). - G. C. Greubel, Sep 19 2024
E.g.f. of column k (with leading zeros): f(x)^k * exp(f(x)) / k! with f(x) = (exp(2*x) - 1)/2. - Seiichi Manyama, Apr 19 2025

A241578 Square array read by antidiagonals upwards: T(n,k) = Sum_{j=1..k} n^(k-j)*Stirling_2(k,j) (n >= 0, k >= 1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 5, 1, 1, 4, 11, 15, 1, 1, 5, 19, 49, 52, 1, 1, 6, 29, 109, 257, 203, 1, 1, 7, 41, 201, 742, 1539, 877, 1, 1, 8, 55, 331, 1657, 5815, 10299, 4140, 1, 1, 9, 71, 505, 3176, 15821, 51193, 75905, 21147, 1, 1, 10, 89, 729, 5497, 35451, 170389, 498118, 609441, 115975, 1
Offset: 0

Views

Author

N. J. A. Sloane, Apr 29 2014

Keywords

Examples

			Array begins:
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 2, 5, 15, 52, 203, 877, 4140, 21147, 115975, 678570, 4213597, ...
1, 3, 11, 49, 257, 1539, 10299, 75905, 609441, 5284451, 49134923, 487026929, ...
1, 4, 19, 109, 742, 5815, 51193, 498118, 5296321, 60987817, 754940848, 9983845261, ...
1, 5, 29, 201, 1657, 15821, 170389, 2032785, 26546673, 376085653, 5736591885, 93614616409, ...
1, 6, 41, 331, 3176, 35451, 447981, 6282416, 96546231, 1611270851, 28985293526, 558413253581, ...
1, 7, 55, 505, 5497, 69823, 1007407, 16157905, 284214097, 5432922775, 112034017735, 2476196276617, ...
1, 8, 71, 729, 8842, 125399, 2026249, 36458010, 719866701, 15453821461, 358100141148, 8899677678109, ...
...
		

Crossrefs

Three versions of this array are A111673, A241578, A241579.

Programs

  • Maple
    with(combinat):
    T:=(n,k)->add(n^(k-j)*stirling2(k,j),j=1..k);
    r:=n->[seq(T(n,k),k=1..12)];
    for n from 0 to 8 do lprint(r(n)); od:

A337592 a(0) = 1; a(n) = (1/n) * Sum_{k=1..n} binomial(n,k)^2 * k * 2^(k-1) * a(n-k).

Original entry on oeis.org

1, 1, 4, 28, 312, 4936, 104128, 2806336, 93560064, 3765265408, 179415074304, 9964625629696, 636737424291840, 46303081167540224, 3796275000959266816, 348100339275620651008, 35448445862069986361344, 3984266642444252234153984, 491556877841462376382332928
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 02 2020

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[n_] := a[n] = (1/n) Sum[Binomial[n, k]^2 k 2^(k - 1) a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 18}]
    nmax = 18; CoefficientList[Series[Exp[(BesselI[0, 2 Sqrt[2 x]] - 1)/2], {x, 0, nmax}], x] Range[0, nmax]!^2

Formula

Sum_{n>=0} a(n) * x^n / (n!)^2 = exp((BesselI(0,2*sqrt(2*x)) - 1) / 2).
Sum_{n>=0} a(n) * x^n / (n!)^2 = exp(Sum_{n>=1} 2^(n-1) * x^n / (n!)^2).

A351028 G.f. A(x) satisfies: A(x) = x + x^2 * A(x/(1 - 2*x)) / (1 - 2*x).

Original entry on oeis.org

0, 1, 0, 1, 4, 13, 44, 173, 792, 4009, 21608, 122761, 737340, 4696341, 31665076, 224846037, 1672266352, 12976252561, 104816144656, 880061135057, 7670326372532, 69286959112797, 647568753568636, 6251768635591613, 62255057942504968, 638658964709824185
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 03 2022

Keywords

Comments

Shifts 2 places left under 2nd-order binomial transform.

Crossrefs

Programs

  • Maple
    bintr:= proc(p) local b;
              b:= proc(n) option remember; add(p(k)*binomial(n, k), k=0..n) end
            end:
    b:= (bintr@@2)(a):
    a:= n-> `if`(n<2, n, b(n-2)):
    seq(a(n), n=0..25);  # Alois P. Heinz, Apr 07 2025
  • Mathematica
    nmax = 25; A[] = 0; Do[A[x] = x + x^2 A[x/(1 - 2 x)]/(1 - 2 x) + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    a[0] = 0; a[1] = 1; a[n_] := a[n] = Sum[Binomial[n - 2, k] 2^k a[n - k - 2], {k, 0, n - 2}]; Table[a[n], {n, 0, 25}];
    (* another pprogram *)
    B[x_] := BesselK[0, 1]*BesselI[0, Exp[x]] - BesselI[0, 1]*BesselK[0, Exp[x]];
    a[n_] := SeriesCoefficient[FullSimplify[Series[B[x], {x, 0, n}]], n] n!;
    Table[a[n], {n, 0, 30}] (* Ven Popov, Apr 25 2025 *)

Formula

a(0) = 0, a(1) = 1; a(n) = Sum_{k=0..n-2} binomial(n-2,k) * 2^k * a(n-k-2).
E.g.f.: BesselK(0, 1)*BesselI(0, exp(x)) - BesselI(0, 1)*BesselK(0, exp(x)). - Ven Popov, Apr 25 2025

A351756 G.f. A(x) satisfies: A(x) = 1 + x * A(x/(1 - 2*x)) / (1 - 2*x)^2.

Original entry on oeis.org

1, 1, 5, 23, 119, 709, 4749, 35031, 281271, 2438565, 22673021, 224739303, 2363075191, 26246762213, 306830932749, 3763323446487, 48292462190743, 646763208308421, 9020009372203965, 130737162573013159, 1965798562640921879, 30613694640191725381
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 18 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 21; A[] = 0; Do[A[x] = 1 + x A[x/(1 - 2 x)]/(1 - 2 x)^2 + O[x]^(nmax + 1) // Normal,nmax + 1]; CoefficientList[A[x], x]
    a[0] = 1; a[n_] := a[n] = Sum[Binomial[n, k - 1] 2^(k - 1) a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 21}]

Formula

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

A375173 Expansion of e.g.f. exp( (1/(1 - 4*x)^(1/2) - 1)/2 ).

Original entry on oeis.org

1, 1, 7, 79, 1225, 24121, 575311, 16105447, 517380529, 18752175505, 756760712311, 33645775575391, 1633792107752377, 86022043957561609, 4880923725657950335, 296882100064302393271, 19269430292162925519841, 1329278651404123963041697
Offset: 0

Views

Author

Seiichi Manyama, Aug 02 2024

Keywords

Comments

For k >= 2, the difference a(n+k) - a(n) is divisible by k. It follows that for each k, the sequence formed by taking a(n) modulo k is periodic with period dividing k. For example, modulo 10 the sequence becomes [1, 1, 7, 9, 5, 1, 1, 7, 9, 5, ...], a purely periodic sequence of period 5. Cf. A047974. - Peter Bala, Feb 11 2025

Crossrefs

Programs

  • Mathematica
    Table[4^n * Sum[Abs[StirlingS1[n, k]] * BellB[k, 1/2] / 2^k, {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Aug 02 2024 *)
  • PARI
    my(N=20, x='x+O('x^N)); Vec(serlaplace(exp((1/(1-4*x)^(1/2)-1)/2)))

Formula

a(n) = Sum_{k=0..n} 4^(n-k) * |Stirling1(n,k)| * A004211(k) = 4^n * Sum_{k=0..n} (1/2)^k * |Stirling1(n,k)| * Bell_k(1/2), where Bell_n(x) is n-th Bell polynomial.
From Vaclav Kotesovec, Aug 02 2024: (Start)
a(n) = 6*(2*n - 3)*a(n-1) - (48*n^2 - 192*n + 191)*a(n-2) + 32*(n-3)*(n-2)*(2*n - 5)*a(n-3).
a(n) ~ 2^(2*n - 1/6) * n^(n - 1/3) / (sqrt(3) * exp(n - 3*2^(-4/3)*n^(1/3) + 1/2)) * (1 - 31/(72*2^(2/3)*n^(1/3)) - 4607/(20736*2^(1/3)*n^(2/3))). (End)
a(n) = (1/exp(1/2)) * (-4)^n * n! * Sum_{k>=0} binomial(-k/2,n)/(2^k * k!). - Seiichi Manyama, Jan 18 2025

A059340 Triangle T(n,k) of numbers with e.g.f. exp((exp((1+x)*y)-1)/(1+x)), k=0..n-1.

Original entry on oeis.org

1, 2, 1, 5, 5, 1, 15, 23, 10, 1, 52, 109, 76, 19, 1, 203, 544, 531, 224, 36, 1, 877, 2876, 3641, 2204, 631, 69, 1, 4140, 16113, 25208, 20089, 8471, 1749, 134, 1, 21147, 95495, 178564, 177631, 100171, 31331, 4838, 263, 1
Offset: 1

Views

Author

Vladeta Jovovic, Jan 27 2001

Keywords

Comments

Essentially triangle given by [1,1,1,2,1,3,1,4,1,5,1,6,...] DELTA [0,1,0,2,0,3,0,4,0,5,0,6,...] = [1;1,0;2,1,0;5,5,1,0;15,23,10,1,0;...] where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 20 2006

Examples

			Triangle starts:
   1;
   2,   1;
   5,   5,   1;
  15,  23,  10,   1;
  52, 109,  76,  19,   1;
		

Crossrefs

Row sums = A004211, T(n,0) = A000110.

Programs

  • Mathematica
    Table[Sum[StirlingS2[n, j]*Binomial[n - j, k], {j, 0, n}], {n, 1,
      5}, {k, 0, n - 1}] (* G. C. Greubel, Jan 07 2017 *)
  • Sage
    T = lambda n,k: sum(stirling_number2(n,j)*binomial(n-j,k) for j in (0..n))
    # Also "for n in (0..11): print([T(n,k) for k in (0..n)])" makes sense.
    for n in (1..11): print([T(n,k) for k in (0..n-1)]) # Peter Luschny, Aug 06 2015

Formula

T(n,k) = Sum_{i=0..n} stirling2(n, n-i)*binomial(i, k).
T(n,k) = Sum_{i=0..n} stirling2(n, i)*binomial(n-i, k). - Peter Luschny, Aug 06 2015

A241577 n^3 + 4*n^2 - 5*n + 1.

Original entry on oeis.org

1, 1, 15, 49, 109, 201, 331, 505, 729, 1009, 1351, 1761, 2245, 2809, 3459, 4201, 5041, 5985, 7039, 8209, 9501, 10921, 12475, 14169, 16009, 18001, 20151, 22465, 24949, 27609, 30451, 33481, 36705, 40129, 43759, 47601, 51661, 55945, 60459, 65209, 70201, 75441, 80935, 86689, 92709, 99001, 105571, 112425, 119569
Offset: 0

Views

Author

N. J. A. Sloane, Apr 27 2014

Keywords

Programs

Formula

G.f.: (1-3*x+17*x^2-9*x^3)/(1-x)^4. - Vincenzo Librandi, Apr 28 2014
Recurrence: a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Fung Lam, May 11 2014
Previous Showing 21-30 of 58 results. Next