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

A000275 Coefficients of a Bessel function (reciprocal of J_0(z)); also pairs of permutations with rise/rise forbidden.

Original entry on oeis.org

1, 1, 3, 19, 211, 3651, 90921, 3081513, 136407699, 7642177651, 528579161353, 44237263696473, 4405990782649369, 515018848029036937, 69818743428262376523, 10865441556038181291819, 1923889742567310611949459, 384565973956329859109177427, 86180438505835750284241676121
Offset: 0

Views

Author

Keywords

Comments

a(n) has the Lucas property, namely a(n) is congruent to a(n_0)a(n_1)...a(n_k) modulo p for any prime p where n_0,n_1,... are the base p digits of n. (Carlitz via McIntosh)

Examples

			From _Peter Bala_, Aug 08 2011: (Start)
a(3) = 19: The 19 pairs of permutations in the group S_3 x S_3 with no common rises correspond to the zero entries in the table below.
  ======================================
   Number of common rises in S_3 x S_3
  ======================================
     | 123   132   213   231   312   321
  ======================================
  123|  2     1     1     1     1     0
  132|  1     1     0     1     0     0
  213|  1     0     1     0     1     0
  231|  1     1     0     1     0     0
  312|  1     0     1     0     1     0
  321|  0     0     0     0     0     0
(End)
G.f. = 1 + x + 3*x^2 + 19*x^3 + 211*x^4 + 3651*x^5 + 90921*x^6 + ...
		

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

Row 2 of A212855.
Cf. A055133 (absolute value of column 0 of triangle), A192721 (column 1), A115368.
Column k=1 of A340986.

Programs

  • Maple
    A000275 := proc(n) sum(z^k/k!^2, k = 0..infinity);
    series(%^x, z=0, n+1): n!^2*coeff(%,z,n); add(abs(coeff(%,x,k)), k=0..n) end:
    seq(A000275(n), n=0..17); # Peter Luschny, May 27 2017
  • Mathematica
    a[0] = 1; a[n_] := a[n] = Sum[(-1)^(r+n+1)*Binomial[n, r]^2 a[r], {r, 0, n-1}]; Table[a[n], {n, 0, 17}] (* Jean-François Alcover, Aug 05 2013 *)
    CoefficientList[Series[1/BesselJ[0,Sqrt[4*x]], {x, 0, 20}], x]* Range[0, 20]!^2 (* Vaclav Kotesovec, Mar 02 2014 *)
    a[ n_] := If[ n < 0, 0, (n! 2^n)^2 SeriesCoefficient[ 1 / BesselJ[ 0, x], {x, 0, 2 n}]]; (* Michael Somos, Aug 20 2015 *)
  • PARI
    {a(n) = if( n<0, 0, n!^2 * 4^n * polcoeff( 1 / besselj(0, x + x * O(x^(2*n))), 2*n))}; /* Michael Somos, May 17 2004 */

Formula

a(n) = Sum_{r=0..n-1} (-1)^(r+n+1) binomial(n, r)^2 a(r), if n > 0.
Sum_{n>=0} a(n) * x^n / n!^2 = 1 / J_0(sqrt(4*x)). - _Michael Somos, May 17 2004
From Peter Bala, Aug 08 2011: (Start)
Conjectural formula: 1 = Sum_{n>=0} a(n)*x^n*Sum_{k>=0} binomial(n+k,k)^2*(-x)^k.
Apart from the initial term, first column of A192721. (End)
E.g.f.: 1/J_0(sqrt(4*x)) = 1 + x/Q(0), where Q(k) = (k+1)^2 - x + (k+1)^2*x/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Dec 06 2013
a(n) ~ c * (n!)^2 / r^n, where r = (1/4)*BesselJZero[0,1]^2 = 1.4457964907366961302939989396139517587678604516... and c = 1/(sqrt(r) * BesselJ(1, 2*sqrt(r))) = 1.60197469692804662664846689139151227422675123376219... - Vaclav Kotesovec, Mar 02 2014, updated Apr 01 2018

Extensions

More terms from Christian G. Bower, Apr 25 2000

A046739 Triangle read by rows, related to number of permutations of [n] with 0 successions and k rises.

Original entry on oeis.org

0, 1, 1, 1, 1, 7, 1, 1, 21, 21, 1, 1, 51, 161, 51, 1, 1, 113, 813, 813, 113, 1, 1, 239, 3361, 7631, 3361, 239, 1, 1, 493, 12421, 53833, 53833, 12421, 493, 1, 1, 1003, 42865, 320107, 607009, 320107, 42865, 1003, 1, 1, 2025, 141549, 1704693, 5494017
Offset: 1

Views

Author

Keywords

Comments

From Emeric Deutsch, May 25 2009: (Start)
T(n,k) is the number of derangements of [n] having k excedances. Example: T(4,2)=7 because we have 3*14*2, 3*4*12, 4*3*12, 2*14*3, 2*4*13, 3*4*21, 4*3*21, each with two excedances (marked). An excedance of a permutation p is a position i such that p(i) > i.
Sum_{k>=1} k*T(n,k) = A000274(n+1). (End)
The triangle 1;1,1;1,7,1;... has general term T(n,k) = Sum_{j=0..n+2} (-1)^(n-j)*C(n+2,j)*A123125(j,k+2) and bivariate g.f. ((1-y)*(y*exp(2*x*y) + exp(x*(y+1))(y^2 - 4*y + 1) + y*exp(2*x)))/(exp(x*y) - y*exp(x))^3. - Paul Barry, May 10 2011
The n-th row is the local h-vector of the barycentric subdivision of a simplex, i.e., the Coxeter complex of type A. See Proposition 2.4 of Stanley's paper below. - Kyle Petersen, Aug 20 2012
T(n,k) is the k-th coefficient of the local h^*-polynomial, or box polynomial, of the s-lecture hall n-simplex with s=(2,3,...,n+1). See Theorem 4.1 of the paper by N. Gustafsson and L. Solus below. - Liam Solus, Aug 23 2018

Examples

			Triangle starts:
  0;
  1;
  1,   1;
  1,   7,   1;
  1,  21,  21,   1;
  1,  51, 161,  51,   1;
  1, 113, 813, 813, 113, 1;
  ...
From _Peter Luschny_, Sep 17 2021: (Start)
The triangle shows the coefficients of the following bivariate polynomials:
  [1] 0;
  [2] x*y;
  [3] x^2*y +     x*y^2;
  [4] x^3*y +   7*x^2*y^2 +     x*y^3;
  [5] x^4*y +  21*x^3*y^2 +  21*x^2*y^3 +     x*y^4;
  [6] x^5*y +  51*x^4*y^2 + 161*x^3*y^3 +  51*x^2*y^4 +     x*y^5;
  [7] x^6*y + 113*x^5*y^2 + 813*x^4*y^3 + 813*x^3*y^4 + 113*x^2*y^5 + x*y^6;
  ...
These polynomials are the permanents of the n X n matrices with all entries above the main antidiagonal set to 'x' and all entries below the main antidiagonal set to 'y'. The main antidiagonals consist only of zeros. Substituting x <- 1 and y <- -1 generates the Euler secant numbers A122045. (Compare with A081658.)
(End)
		

Crossrefs

Cf. A046740.
Row sums give A000166.
Diagonals give A070313, A070315.
T(2n,n) gives A320337.

Programs

  • Maple
    G := (1-t)*exp(-t*z)/(1-t*exp((1-t)*z)): Gser := simplify(series(G, z = 0, 15)): for n to 13 do P[n] := sort(expand(factorial(n)*coeff(Gser, z, n))) end do: 0; for n to 11 do seq(coeff(P[n], t, j), j = 1 .. n-1) end do; # yields sequence in triangular form # Emeric Deutsch, May 25 2009
  • Mathematica
    max = 12; f[t_, z_] := (1-t)*(Exp[-t*z]/(1 - t*Exp[(1-t)*z])); se = Series[f[t, z], {t, 0, max}, {z, 0, max}];
    coes = Transpose[ #*Range[0, max]! & /@ CoefficientList[se, {t, z}]]; Join[{0}, Flatten[ Table[ coes[[n, k]], {n, 2, max}, {k, 2, n-1}]]] (* Jean-François Alcover, Oct 24 2011, after g.f. *)
    E1[n_ /; n >= 0, 0] = 1; (* E1(n,k) are the Eulerian numbers *)
    E1[n_, k_] /; k < 0 || k > n = 0;
    E1[n_, k_] := E1[n, k] = (n-k) E1[n-1, k-1] + (k+1) E1[n-1, k];
    T[n_, k_] := Sum[Binomial[-j-1, -n-1] E1[j, k], {j, 0, n}];
    Table[T[n, k], {n, 1, 100}, {k, 1, n-1}] /. {} -> {0} // Flatten (* Jean-François Alcover, Oct 31 2020, after Peter Luschny in A271697 *)
    Table[Expand[n!Factor[SeriesCoefficient[(x-y)/(x Exp[y t]-y Exp[x t]),{t,0,n}]]],{n,0,12}]//TableForm (* Mamuka Jibladze, Nov 26 2024 *)
  • PARI
    T(n)={my(x='x+O('x^(n+1))); concat([[0]], [Vecrev(p/y) | p<-Vec(-1+serlaplace((y-1)/(y*exp(x)-exp(x*y))))])}
    { my(A=T(10));for(i=1,#A,print(A[i])) } \\ Andrew Howroyd, Nov 13 2024

Formula

a(n+1, r) = r*a(n, r) + (n+1-r)*a(n, r-1) + n*a(n-1, r-1).
exp(-t)/(1 - exp((x-1)t)/(x-1)) = 1 + x*t^2/2! + (x+x^2)*t^3/3! + (x+7x^2+x^3)*t^4/4! + (x+21x^2+21x^3+x^4)*t^5/5! + ... - Philippe Deléham, Jun 11 2004
E.g.f.: (y-1)/(y*exp(x) - exp(x*y)). - Mamuka Jibladze, Nov 08 2024

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Apr 07 2000

A060350 The sum over all subsets S of [n] of the squares of the number of permutations with descent set = S.

Original entry on oeis.org

1, 1, 2, 10, 88, 1216, 24176, 654424, 23136128, 1035227008, 57186502912, 3822411268864, 304059285928960, 28385946491599360, 3073391215118186496, 381995951933025287680, 54020316243835807039488, 8624091617045072628121600, 1543536018434416280510332928
Offset: 0

Views

Author

Mike Zabrocki, Mar 31 2001

Keywords

Comments

a(n) = number of ordered pairs of permutations of [n] such that the first has an ascent wherever the second has a descent and vice versa. For example, the pair of permutations (1243, 4123) does not qualify because they have a common ascent starting at location 2, and a(2) = 2 counts (12, 21), (21, 12). - David Callan, Sep 15 2013

Examples

			a(1)=1^2; a(2)=1^2+1^2; a(3)=1^2+2^2+2^2+1^2; a(4)=1^2+3^2+5^2+3^2+3^2+5^2+3^2+1^2.
		

Crossrefs

Row sums of A259465.
Column k=2 of A334622.

Programs

  • Maple
    ct := proc(k) option remember; local i,out,n; if k=0 then RETURN(1); fi; n := floor(evalf(log[2](k)))+1; if k=2^n or k=2^(n+1)-1 then RETURN(1); fi; out := 0; for i from 1 to n do if irem(iquo(k, 2^(i-1)), 2) = 1 and irem(iquo(2*k,2^(i-1)),2) =0 then out := out+(n-1)!/(i-1)!/(n-i)!* ct(floor(irem(k,2^(i-1))+2^(i-2)))*ct(iquo(k,2^i)); fi; od; out; end: seq(add(ct(i)^2,i=floor(2^(n-1))..2^n-1), n=0..15);
    # second Maple program:
    b:= proc(u, o, h) option remember; `if`(u+o=0, 1,
          add(add(b(u-j, o+j-1, h+i-1), i=1..u+o-h), j=1..u)+
          add(add(b(u+j-1, o-j, h-i), i=1..h), j=1..o))
        end:
    a:= n-> b(0, n$2):
    seq(a(n), n=0..20);  # Alois P. Heinz, Jul 02 2015
  • Mathematica
    b[u_, o_, h_] := b[u, o, h] = If[u + o == 0, 1, Sum[Sum[b[u - j, o + j - 1, h + i - 1], {i, 1, u + o - h}], {j, 1, u}] + Sum[Sum[b[u + j - 1, o - j, h - i], {i, 1, h}], {j, 1, o}]]; a[n_] := b[0, n, n]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Nov 11 2015, after Alois P. Heinz *)

Formula

a(n) = A137782(2n) / A000984(n).
a(n) = Sum_{j=0..ceiling(2^(n-1))-1} A060351(n,j)^2. - Alois P. Heinz, Sep 15 2020
a(n) ~ c * d^n * n!^2, where d = 0.552406011965766199179395470003589240257321... and c = 1.6412834540969426814342654061364... - Vaclav Kotesovec, Sep 18 2020

Extensions

Two more terms from Max Alekseyev, May 06 2009
a(0) prepended, a(18) from Alois P. Heinz, Jul 02 2015

A362745 Triangular array read by rows. T(n,k) is the number of ordered pairs of n-permutations with exactly k rise/falls or fall/rises, n >= 0, 0 <= k <= max{0,n-1}.

Original entry on oeis.org

1, 1, 2, 2, 10, 16, 10, 88, 200, 200, 88, 1216, 3536, 4896, 3536, 1216, 24176, 85872, 149152, 149152, 85872, 24176, 654424, 2743728, 5714472, 7176352, 5714472, 2743728, 654424, 23136128, 111842432, 270769536, 407103104, 407103104, 270769536, 111842432, 23136128
Offset: 0

Views

Author

Geoffrey Critzer, May 01 2023

Keywords

Comments

Let ( (a_1,a_2,...,a_n), (b_1,b_2,...,b_n) ) be an ordered pair of n-permutations. Then the pairs (a_i,a_(i+1)) and (b_i,b_(i+1)) are both rises, both falls, a rise and a fall, or a fall and a rise. T(n,k) is the number of ordered pairs of n-permutations that have a total of k rise/falls and fall/rises.

Examples

			Triangle begins:
    1;
    1;
    2,    2;
   10,   16,   10;
   88,  200,  200,   88;
 1216, 3536, 4896, 3536, 1216;
 ...
In the ordered pair of permutations ( (1,2,3,5,4), (4,2,1,3,5) ) we have a rise/fall, rise/fall, rise/rise, fall/rise.  So this ordered pair is counted in T(5,3).
		

Crossrefs

Cf. A060350 (column k=0), A001044 (row sums), A259465.

Programs

  • Maple
    b:= proc(n, u, v) option remember; expand(`if`(n=0, 1,
          add(add(b(n-1, u-j, v-i), i=1..v)+
              add(b(n-1, u-j, v+i-1)*x, i=1..n-v), j=1..u)+
          add(add(b(n-1, u+j-1, v-i)*x, i=1..v)+
              add(b(n-1, u+j-1, v+i-1), i=1..n-v), j=1..n-u)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):
    seq(T(n), n=0..10);  # Alois P. Heinz, May 01 2023
  • Mathematica
    nn = 8; A[z_] := Total[Select[Import["https://oeis.org/A060350/b060350.txt", "Table"],Length@# == 2 &][[All, 2]]*Table[z^n/n!^2, {n, 0, 250}]];B[n_] := n!^2; e[z_] := Sum[z^n/B[n], {n, 0, nn}]; Map[Select[#, # > 0 &] &,Table[B[n], {n, 0, nn}] CoefficientList[Series[((1 - u) A[(1 - u) z])/(1 - u A[(1 - u) z]), {z, 0, nn}], {z, u}]] // Flatten

Formula

Sum_{n>=0} Sum_{k=0..n-1} u^k*z^n/(n!)^2 = ((1 - u) A((1 - u) z))/(1 - u A((1 - u) z)) where A(z) = Sum_{n>=0} A060350*z^n/(n!)^2. Theorem 4 in Carlitz, Scoville, Vaughan link.
Showing 1-4 of 4 results.