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.

A350970 Triangle T(n,k) (n>=0, 0<=k<=n) read by rows: T(0,0)=T(1,1)=1; T(n,0) is the Euler number A000111(n-1) for n>=1; T(n,n-1) = T(n,n) = (n-2)! for n>=2; interior entries are given by T(n,k) = m*T(n-1,k-1)+(k+1)*T(n-1,k+1) where m = k if n+k is even or k-1 if n+k is odd.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 5, 8, 6, 6, 5, 16, 28, 40, 24, 24, 16, 61, 136, 180, 240, 120, 120, 61, 272, 662, 1232, 1320, 1680, 720, 720, 272, 1385, 3968, 7266, 12096, 10920, 13440, 5040, 5040, 1385, 7936, 24568, 56320, 83664, 129024, 100800, 120960, 40320, 40320, 7936, 50521, 176896, 408360, 814080, 1023120, 1491840, 1028160, 1209600, 362880, 362880
Offset: 0

Views

Author

N. J. A. Sloane, Mar 03 2022

Keywords

Comments

Triangle connects Euler numbers on left and factorial numbers on right.

Examples

			Triangle begins:
    1,
    1,    1,
    1,    1,    1,
    1,    2,    2,    2,
    2,    5,    8,    6,     6,
    5,   16,   28,   40,    24,    24,
   16,   61,  136,  180,   240,   120,   120,
   61,  272,  662, 1232,  1320,  1680,   720,  720,
  272, 1385, 3968, 7266, 12096, 10920, 13440, 5040, 5040,
  ...
This may also be constructed as a square array, with entries T(n,k), n >= 1, 0 <= k, whose columns have e.g.f. equal to sec(x)+tan(x) (if k=0) and sec(x)*tan(x)^(k-1)*(sec(x)+tan(x)) (if k>0):
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
2, 5, 8, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, ...
5, 16, 28, 40, 24, 24, 0, 0, 0, 0, 0, 0, 0, ...
16, 61, 136, 180, 240, 120, 120, 0, 0, 0, 0, 0, 0, ...
61, 272, 662, 1232, 1320, 1680, 720, 720, 0, 0, 0, 0, 0, ...
272, 1385, 3968, 7266, 12096, 10920, 13440, 5040, 5040, 0, 0, 0, 0, ...
...
		

References

  • A. Boutin, Query 2784, L'Intermédiaire des Mathématiciens, 11 (1904), 252-254.
  • E. Estanave, Query 2784, L'Intermédiaire des Mathématiciens, 11 (1904), pp. 117-118.

Crossrefs

The initial columns are A000111, A000111, A225689, A350971.
The diagonals, reading from the right, are (essentially) A000142, A000142, A002301, A006157, A002302, A350973, A002303, A350974, A350975.
Rows sums give A156142(n-1).
Cf. A007836.

Programs

  • Maple
    for n from 0 to 12 do
    T[n]:=Array(0..n,0);
    T[0,0] := 1;
    T[1,0] := 1; T[1,1] := 1;
    if n>1 then
      T[n,0] := T[n-1,1];
    for k from 1 to n-2 do
    m:=k; if ((n+k) mod 2) = 0 then m:=k-1; fi;
    T[n,k] := m*T[n-1,k-1] + (k+1)*T[n-1,k+1];
    od:
    T[n,n-1] := (n-1)*T[n-1,n-2];
    T[n,n] := T[n,n-1];
    fi;
    lprint( [seq(T[n,k],k=0..n)] );
    od:
    # second Maple program:
    b:= proc(n, i) option remember; `if`(i=0,
         `if`(n=0, 1, 0), b(n, i-1)+b(n-1, n-i))
        end:
    T:= proc(n, k) option remember; `if`(n=0 and k=0, 1,
         `if`(k=0, b(n-1$2), `if`(n-k<=1, (n-1)!, (k+1)*
          T(n-1, k+1)+(k-irem(1+n+k, 2))*T(n-1, k-1))))
        end:
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Mar 04 2022
    # To produce the square array, N. J. A. Sloane, Mar 05 2022:
    read(transforms):
    myegf := (f,M) -> SERIESTOLISTMULT(series(f,x,M));
    T:=proc(n,k,M) local i;
    if k=0 then myegf((sec(x)+tan(x)),M)[n];
    else
    myegf(sec(x)*tan(x)^(k-1)*(sec(x)+tan(x)),M)[n];
    fi;
    end;
    [seq(T(n,0,16),n=1..5)];
    for n from 1 to 8 do
    lprint([seq(T(n,k,16),k=0..12)]);
    od:
  • Mathematica
    b[n_, i_] := b[n, i] = If[i == 0,
         If[n == 0, 1, 0], b[n, i - 1] + b[n - 1, n - i]];
    T[n_, k_] := T[n, k] = If[n == 0 && k == 0, 1,
         If[k == 0, b[n - 1, n - 1], If[n - k <= 1, (n - 1)!, (k + 1)*
         T[n - 1, k + 1] + (k - Mod[1 + n + k, 2])*T[n - 1, k - 1]]]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Mar 12 2022, Alois P. Heinz *)

Formula

If we ignore the n=0 row, then the e.g.f. for column 0 is sec(x)+tan(x), and for column k >= 1 it is sec(x)*tan(x)^(k-1)*(sec(x)+tan(x)). See the initial rows of the square array in the EXAMPLES section. - N. J. A. Sloane, Mar 05 2022
abs(Sum_{k=0..n} (-1)^k * T(n,k)) = A007836(n) for n>=2. - Alois P. Heinz, Mar 04 2022

A225688 E.g.f.: sec(x)^3+(sec(x)^2*tan(x)).

Original entry on oeis.org

1, 1, 3, 8, 33, 136, 723, 3968, 25953, 176896, 1376643, 11184128, 101031873, 951878656, 9795436563, 104932671488, 1212135593793, 14544442556416, 186388033956483, 2475749026562048, 34859622790687713, 507711943253426176, 7791941518975112403, 123460740095103991808
Offset: 0

Views

Author

N. J. A. Sloane, May 26 2013

Keywords

Comments

Number of up-down min-max permutations of n elements.

Crossrefs

Programs

  • Mathematica
    Table[n!*SeriesCoefficient[(1+Sin[x])/Cos[x]^3,{x,0,n}] ,{n,0,20}] (* Vaclav Kotesovec, May 26 2013 *)

Formula

The e.g.f. can also be written as (1+sin(x))/cos(x)^3.
a(n)+A225689(n) = A000111(n+2). - corrected by Vaclav Kotesovec, May 26 2013
a(n) ~ n! * n^2*(2/Pi)^(n+3). - Vaclav Kotesovec, May 26 2013

A164575 a(n) = n! * [x^n] 2*(tan(x))^2*(sec(x) + tan(x)).

Original entry on oeis.org

0, 0, 4, 12, 56, 240, 1324, 7392, 49136, 337920, 2652244, 21660672, 196658216, 1859020800, 19192151164, 206057828352, 2385488163296, 28669154426880, 367966308562084, 4893320282898432, 68978503204900376, 1005520890400604160, 15445185289163949004, 244890632417194278912
Offset: 0

Views

Author

Stefano Spezia, Aug 12 2019

Keywords

Crossrefs

Programs

  • Maple
    gf := (2*sin(x)*tan(x))/(1 - sin(x)): ser := series(gf, x, 25):
    seq(n!*coeff(ser, x, n), n=0..23); # Peter Luschny, Aug 19 2019
  • Mathematica
    CoefficientList[Series[2Tan[x]^2(Sec[x]+Tan[x]),{x,0,23}],x]*Table[n!,{n,0,23}]
  • PARI
    my(x='x+O('x^30)); concat([0,0], Vec(serlaplace(2*(tan(x))^2*(1/cos(x) + tan(x))))) \\ Michel Marcus, Aug 13 2019

Formula

a(n-2) = |{up-down 2nd-max-upper permutations in S_n}| for n >= 2 (see Definition 3.4 in Kobayashi).
a(0) = 0 and a(n) = 2*A000142(n)*Sum_{i,j,k>=0, (2*i+1)+(2*j+1)+k=n} A000111(2*i+1)*A000111(2*j+1)*A000111(k)/(A000142(2*i+1)*A000142(2*j+1)*A000142(k)) for n > 0 (see Lemma 3.6 in Kobayashi).
a(2*n) = 2*A225689(2*n) (see Lemma 4.2 in Kobayashi).
a(n) ~ n! * 2^(n+4) * n^2 / Pi^(n+3). - Vaclav Kotesovec, Aug 12 2019

A350971 Expansion of e.g.f.: (sec(x)*tan(x))^2*(1+sin(x)).

Original entry on oeis.org

0, 0, 2, 6, 40, 180, 1232, 7266, 56320, 408360, 3610112, 30974526, 309836800, 3065784540, 34342971392, 384653685786, 4778192404480, 59724464976720, 815553380483072, 11249503075325046, 167586815066767360, 2527964965265232900, 40815105402865713152, 668249973079223076306, 11626293107260590653440, 205304046476194041001080
Offset: 0

Views

Author

N. J. A. Sloane, Mar 03 2022

Keywords

Comments

0, 0, followed by column 3 of A350970.

Crossrefs

Formula

E.g.f.: (sec(x)*tan(x))^2*(1+sin(x)).

A309845 Expansion of e.g.f.: sec(x) + 2*tan(x).

Original entry on oeis.org

1, 2, 1, 4, 5, 32, 61, 544, 1385, 15872, 50521, 707584, 2702765, 44736512, 199360981, 3807514624, 19391512145, 419730685952, 2404879675441, 58177770225664, 370371188237525, 9902996106248192, 69348874393137901, 2030847773013704704, 15514534163557086905, 493842960380415967232
Offset: 0

Views

Author

Stefano Spezia, Aug 20 2019

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[Sec[x]+2Tan[x],{x,0,25}],x]*Table[n!,{n,0,25}]
  • PARI
    my(x='x+O('x^30)); Vec(serlaplace(1/cos(x)+2*tan(x))) \\ Michel Marcus, Aug 20 2019

Formula

a(n-2) = |{up-down 2nd-max-lower permutations in S_n}| for n >= 2 (see Definition 3.4 in Kobayashi).
a(n) = A000111(n+2) - A164575(n) (See Definition 3.4 in Kobayashi).
a(n) = A225688(n) + A225689(n) - A164575(n) (See Heneghan-Petersen and Kobayashi articles).
a(2*n) = A000111(2*n) (See Lemma 3.8 in Kobayashi).
a(2*n+1) = 2*A000111(2*n+1) (See Lemma 3.8 in Kobayashi).
Showing 1-5 of 5 results.