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

A250286 Number of permutations p of [n] such that p(i) > p(i+1) iff i == 0 (mod 9).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 54, 219, 714, 2001, 5004, 11439, 24309, 48619, 831384, 9069651, 64369341, 355150566, 1635163542, 6542615421, 23369110326, 75953123676, 227864057851, 5742168041637, 90830731860000, 920922875075934, 7159714782188364
Offset: 0

Views

Author

Alois P. Heinz, Nov 16 2014

Keywords

Crossrefs

Row n=9 of A181937.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
         `if`(t=0, add(b(u-j, o+j-1, irem(t+1, 9)), j=1..u),
                   add(b(u+j-1, o-j, irem(t+1, 9)), j=1..o)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..35);
  • Mathematica
    nmax = 30; CoefficientList[Series[1 + Sum[(x^(9 - k) * HypergeometricPFQ[{1}, {10/9 - k/9, 11/9 - k/9, 4/3 - k/9, 13/9 - k/9, 14/9 - k/9, 5/3 - k/9, 16/9 - k/9, 17/9 - k/9, 2 - k/9}, -x^9/387420489])/(9 - k)!, {k, 0, 8}] / HypergeometricPFQ[{}, {1/9, 2/9, 1/3, 4/9, 5/9, 2/3, 7/9, 8/9}, -x^9/387420489], {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, Apr 21 2021 *)

A250287 Number of permutations p of [n] such that p(i) > p(i+1) iff i == 0 (mod 10).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 65, 285, 1000, 3002, 8007, 19447, 43757, 92377, 184755, 3527140, 42031760, 326057040, 1961245375, 9812764391, 42530831916, 164059546366, 574224816166, 1850302218766, 5550936701311, 156435448534980, 2711548312208295
Offset: 0

Views

Author

Alois P. Heinz, Nov 16 2014

Keywords

Crossrefs

Row n=10 of A181937.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
         `if`(t=0, add(b(u-j, o+j-1, irem(t+1, 10)), j=1..u),
                   add(b(u+j-1, o-j, irem(t+1, 10)), j=1..o)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..35);
  • Mathematica
    nmax = 30; CoefficientList[Series[1 + Sum[(x^(10 - k) * HypergeometricPFQ[{1}, {11/10 - k/10, 6/5 - k/10, 13/10 - k/10, 7/5 - k/10, 3/2 - k/10, 8/5 - k/10, 17/10 - k/10, 9/5 - k/10, 19/10 - k/10, 2 - k/10}, -x^10/10000000000])/(10 - k)!, {k, 0, 9}] / HypergeometricPFQ[{}, {1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10, 4/5, 9/10}, -x^10/10000000000], {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, Apr 21 2021 *)

A181992 n-alternating permutations of length n^2.

Original entry on oeis.org

1, 1, 5, 1513, 60376809, 613498040952501, 2655748106132754540814283, 7350748555338515554166266981278924209, 18155845241010181420704703186769135339279915667193169, 53121946985233865823079732996510797894348260342024814486694637630897821
Offset: 0

Views

Author

Peter Luschny, Apr 05 2012

Keywords

Comments

These are the generalized Euler numbers A181985(n, n) and also the André numbers A181937(n, n^2).

Crossrefs

Programs

  • Maple
    A181992 := proc(n) local E, dim, i, k; dim := n*n;
    E := array(0..dim, 0..dim); E[0, 0] := 1;
    for i from 1 to dim do
    if i mod n = 0 then E[i, 0] := 0 ;
       for k from i-1 by -1 to 0 do E[k, i-k] := E[k+1, i-k-1] + E[k, i-k-1] od;
    else E[0, i] := 0;
       for k from 1 by 1 to i do E[k, i-k] := E[k-1, i-k+1] + E[k-1, i-k] od;
    fi od;
    E[0, dim] end:
    seq(A181992(i),i=0..9);
  • Mathematica
    A181985[n_, len_] := Module[{e, dim = n*(len - 1)}, e[0, 0] = 1; For[i = 1, i <= dim, i++, If[Mod[i, n] == 0, e[i, 0] = 0; For[k = i - 1, k >= 0, k--, e[k, i - k] = e[k + 1, i - k - 1] + e[k, i - k - 1]], e[0, i] = 0; For[k = 1, k <= i, k++, e[k, i - k] = e[k - 1, i - k + 1] + e[k - 1, i - k]]]]; Table[e[0, n*k], {k, 0, len - 1}]]; a[n_] := A181985[n, n + 1][[n + 1]]; Table[a[n], {n, 1, 14}] (* Jean-François Alcover, Dec 17 2013, after Maple code in A181985 *)

Extensions

a(0)=1 prepended by Alois P. Heinz, Aug 12 2019

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

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).
Previous Showing 11-15 of 15 results.