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.

A000994 Shifts 2 places left under binomial transform.

Original entry on oeis.org

1, 0, 1, 1, 2, 5, 13, 36, 109, 359, 1266, 4731, 18657, 77464, 337681, 1540381, 7330418, 36301105, 186688845, 995293580, 5491595645, 31310124067, 184199228226, 1116717966103, 6968515690273, 44710457783760, 294655920067105, 1992750830574681, 13817968813639426
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of permutations of [n-1] that avoid both of the dashed patterns 1-23 and 3-12 and start with a descent (or are a singleton). For example, a(5)=5 counts 2143, 3142, 3214, 3241, 4321. - David Callan, Nov 21 2011

Examples

			A(x) = 1 + x^2/(1-x) + x^4/((1-x)^2*(1-2x)) + x^6/((1-x)^2*(1-2x)^2*(1-3x)) +...
		

References

  • Ulrike Sattler, Decidable classes of formal power series with nice closure properties, Diplomarbeit im Fach Informatik, Univ. Erlangen - Nuernberg, Jul 27 1994
  • 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=2 of A143983. Cf. A007476, A088022, A086880.

Programs

  • Haskell
    a000994 n = a000994_list !! n
    a000994_list = 1 : 0 : us where
      us = 1 : 1 : f 2 where
        f x = (1 + sum (zipWith (*) (map (a007318' x) [2..x]) us)) : f (x + 1)
    -- Reinhard Zumkeller, Jun 02 2013
  • Maple
    A000994 := proc(n) local k; option remember; if n <= 1 then 1 else 1 + add(binomial(n, k)*A000994(k - 2), k = 2 .. n); fi; end;
  • Mathematica
    a[n_] := a[n] = 1 + Sum[Binomial[n, k]*a[k-2], {k, 2, n}]; Join[{1, 0}, Table[a[n], {n, 0, 24}]] (* Jean-François Alcover, Oct 11 2011, after Maple *)
  • PARI
    a(n)=polcoeff(sum(k=0, n, x^(2*k)*(1-k*x)/prod(j=0, k, 1-j*x+x*O(x^n))^2), n) \\ Paul D. Hanna, Nov 02 2006
    

Formula

Since this satisfies a recurrence similar to that of the Bell numbers (A000110), the asymptotic behavior is presumably just as complicated - see A000110 for details.
However, a(n)/A000995(n) (e.g., 77464/63117) -> 1.228..., the constant in A051148 and A051149.
O.g.f.: A(x) = Sum_{n>=0} x^(2*n)*(1-n*x)/Product_{k=0..n} (1-k*x)^2. - Paul D. Hanna, Nov 02 2006
Let S(n) = Sum_{k >= 1} k^n/k!^2. Then S(n) = a(n)*S(0) + A000995(n)*S(1) is stated in A086880, where S(0) = 2.279585302... (see A070910) and S(1) = 1.590636854... (see A096789). Cf. A088022. - Peter Bala, Jan 27 2015
G.f. A(x) satisfies: A(x) = 1 + x^2 * A(x/(1 - x)) / (1 - x). - Ilya Gutkovskiy, Aug 09 2020

A006789 Bessel numbers: the number of nonoverlapping partitions of an n-set into equivalence classes.

Original entry on oeis.org

1, 1, 2, 5, 14, 43, 143, 509, 1922, 7651, 31965, 139685, 636712, 3020203, 14878176, 75982829, 401654560, 2194564531, 12377765239, 71980880885, 431114329728, 2656559925883, 16825918195484, 109439943234749, 730365368850192
Offset: 0

Views

Author

Keywords

Comments

From Lara Pudwell, Oct 23 2008: (Start)
A permutation p avoids a pattern q if it has no subsequence that is order-isomorphic to q. For example, p avoids the pattern 132 if it has no subsequence abc with a < c < b.
Barred pattern avoidance considers permutations that avoid a pattern except in a special case. Given a barred pattern q, we may form two patterns, q1 = the sequence of unbarred letters of q and q2 = the sequence of all letters of q.
A permutation p avoids barred pattern q if every instance of q1 in p is embedded in a copy of q2 in p. In other words, p avoids q1, except in the special case that a copy of q1 is a subsequence of a copy of q2.
For example, if q=5{bar 1}32{bar 4}, then q1=532 and q2 = 51324. p avoids q if every for decreasing subsequence acd of length 3 in p, one can find letters b and e so that the subsequence abcde of p has b < d < c < e < a. (End)
Nonoverlapping means that the intervals associated with the minimum to maximum integers of any two non-singleton blocks of a partition do not overlap. Instead, the intervals are disjoint or one contains another. - Michael Somos, Oct 06 2003
Apparently, also the number of permutations in S_n avoiding 2{bar 5}3{bar 1}4 (i.e., every occurrence of 234 is contained in an occurrence of a 25314). - Lara Pudwell, Apr 25 2008
From Gary W. Adamson, Dec 20 2008: (Start)
Convolved with A153197 = A006789 shifted: (1, 2, 5, 14, ...); equivalent to row sums of triangle A153206 = (1, 2, 5, 14, ...).
Equals inverse binomial transform of A153197 and INVERT transform of A153197 prefaced with a 1.
Can be generated from the Hankel transform [1,1,1,...] through successive iterative operations of: binomial transform, INVERT transform, binomial transform, (repeat)...; or starting with INVERT transform. The operations converge to a two sequence limit cycle of A006789 and its binomial transform, A153197.
Shifts to (1, 2, 5, 14, ...) with A006789 * A153197 prefaced with a 1; i.e., (1, 2, 5, 14, 43, ...) = (1, 1, 2, 5, 14, ...) * (1, 1, 2, 5, 15, ...); where A153197 = (1, 2, 5, 15, 51, 189, 748, 3128, 13731, ...). (End)
a(n) = term (1,1) of M^n, where M = an infinite Cartan-like matrix with 1's the super- and subdiagonals (diagonals starting at (1,2) and (2,1) respectively) and the main diagonal = (1,2,3,...). - Gary W. Adamson, Dec 21 2008
From David Callan, Nov 11 2011: (Start)
a(n) is indeed the number of permutations in S_n avoiding the pattern tau = 2{bar 5}3{bar 1}4 of the Pudwell comment.
Proof. It is known (Claesson and Mansour link, Proposition 2, p.2) that a(n) is the number of permutations in S_n avoiding both of the dashed patterns 1-23 and 12-3, and we show that a permutation p avoids tau <=> p avoids both 1-23 and 12-3.
(=>) For an increasing triple abc in a tau-avoider p, there must be a "5" between the a and b. So p certainly avoids 12-3, and similarly p avoids 1-23.
(<=) For an increasing triple abc in a (12-3)-avoider, there must be an entry x between a and b. We will see that an x>c can be found and this x will serve as the required "5". If x < b, you can take x as a new "a" and the new abc are closer in position. Repeat until x > b. If x < c, you can take x as a new "b" that is closer to c in value. Repeat until x > c. Done. An analogous method produces the required "1". (End)

Examples

			G.f. = 1 + x + 2*x^2 + 5*x^3 + 14*x^4 + 43*x^5 + 143*x^6 + 509*x^7 + ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000110.
Cf. A153197. - Gary W. Adamson, Dec 20 2008
Cf. A086880.

Programs

  • Mathematica
    nmax = 24; m = SparseArray[{{i_, i_} :> i, Band[{1, 2}] -> 1, Band[{2, 1}] -> 1}, {nmax, nmax}]; a[n_] := MatrixPower[m, n][[1, 1]]; Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Nov 22 2012, after Gary W. Adamson *)
  • PARI
    {a(n) = local(m); if( n<0, 0, m = contfracpnqn(matrix(2, n\2, i, k, if( i==1, -x^2, 1 - (k+1)*x))); polcoeff( 1 / (1 - x + m[2,1] / m[1,1]) + x * O(x^n), n))}; /* Michael Somos, Oct 06 2003 */
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = O(x^0); for(i=0, n\2, A = subst((1 + x) / (1 - x^2*A), x, x / (1 - x))); polcoeff( A, n))}; /* Michael Somos, Sep 22 2005 */

Formula

G.f.: 1 / (1 - x - x^2 / (1 - 2*x - x^2 / (1 - 3*x - x^2 / ...))) (a continued fraction). - Michael Somos, Oct 06 2003
G.f.: 1/(U(0)-1) + 1/x^2 where U(k)= 1 - x*(k+1) + x/(1 + x/U(k+1)) ; (continued fraction, 2-step). - Sergei N. Gladkovskii, Oct 13 2012
G.f.: T(0)/(1-x), where T(k) = 1 - x^2/( x^2 - (1-x*(k+1))*(1-x*(k+2))/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Nov 02 2013
a(n) ~ Sum_{k>=0} k^(n+2)/(k!)^2 = A086880(n+2). - Vaclav Kotesovec, Aug 24 2014
Conjecture: a(n) = R(n, 0) for n >= 0 where R(n, q) = R(n-1, q+1) + Sum_{j=0..q-1} binomial(q, j+1)*R(n-1, j) for n > 0, q >= 0 with R(0, q) = 1 for q >= 0. - Mikhail Kurkov, Aug 11 2023

Extensions

Edited by Michael Somos, Oct 06 2003

A229020 Decimal expansion of 1 - 1/(1*2) + 1/(1*2*2) - 1/(1*2*2*3) + ...

Original entry on oeis.org

6, 8, 8, 9, 4, 8, 4, 4, 7, 6, 9, 8, 7, 3, 8, 2, 0, 4, 0, 5, 4, 9, 5, 0, 0, 1, 5, 8, 1, 1, 8, 6, 7, 1, 0, 5, 3, 3, 1, 3, 6, 2, 9, 4, 3, 2, 8, 9, 9, 2, 2, 4, 0, 6, 9, 3, 8, 5, 5, 1, 7, 6, 7, 0, 5, 5, 7, 6, 0, 3, 0, 5, 6, 9, 7, 3, 1, 5, 1, 5, 7, 6, 1, 3, 3, 9, 4, 9, 4, 0, 9, 6, 2, 2, 5, 6, 9, 7, 3, 7, 4, 6, 8, 3, 9, 1, 0, 7, 1, 3, 2, 5, 5
Offset: 0

Views

Author

Ralf Stephan, Sep 11 2013

Keywords

Comments

From Peter Bala, Jan 28 2015: (Start)
As a sum of positive terms, the constant equals Sum_{k >= 1} k/(k!*(k+1)!). If we set S(n) = Sum_{k >= 0} k^n/(k!*(k+1)!) for n >= 0, so this constant is S(1), then S(n) is an integral linear combination of S(0) and S(1). For example S(7) = 16*S(0) + 11*S(1). Cf. A086880. S(0) is A096789.
The Pierce expansion of this constant begins [1, 3, 14, 15, 26, 40, 43, 71, 83, 8120, ...] giving the alternating series representation for this constant 1 - 1/3 + 1/(3*14) - 1/(3*14*15) + 1/(3*14*15*26) - .... (End)

Examples

			0.68894844769873820405495001581186710536...
		

Crossrefs

Cf. A130820.

Programs

  • Mathematica
    digits = 113; NSum[(-1)^(n+1)*1/Product[1+Floor[k/2], {k, 1, n}], {n, 1, Infinity}, NSumTerms -> digits, Method -> "AlternatingSigns", WorkingPrecision -> digits+5] // RealDigits[#, 10, digits]& // First (* Jean-François Alcover, Feb 21 2014 *)
    RealDigits[BesselI[2, 2], 10, 113][[1]] (* Jean-François Alcover, Nov 19 2015, after Peter Bala *)
  • PARI
    suminf(n=1,(-1)^(n+1)*1./prod(i=1,n,1+floor(i/2)))
    
  • PARI
    suminf(k=1, k/(k!*(k+1)!)) \\ Michel Marcus, Feb 03 2015
    
  • PARI
    besseli(2, 2) \\ Altug Alkan, Nov 19 2015

Formula

Equals exp(-2) * Sum_{k>=0} binomial(2*k,k)/(k+1)!. - Amiram Eldar, Jun 12 2021

A246118 T(n,k), for n,k >= 1, is the number of partitions of the set [n] into k blocks, where, if the blocks are arranged in order of their minimal element, the odd-indexed blocks are all singletons.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 4, 1, 0, 1, 4, 11, 6, 1, 0, 1, 5, 26, 23, 9, 1, 0, 1, 6, 57, 72, 50, 12, 1, 0, 1, 7, 120, 201, 222, 86, 16, 1, 0, 1, 8, 247, 522, 867, 480, 150, 20, 1, 0, 1, 9, 502, 1291, 3123, 2307, 1080, 230, 25, 1, 0, 1, 10, 1013, 3084, 10660, 10044, 6627, 2000, 355, 30, 1
Offset: 1

Views

Author

Peter Bala, Aug 14 2014

Keywords

Comments

Unsigned matrix inverse of A246117. Analog of the Stirling numbers of the second kind, A048993.
This is the triangle of connection constants between the monomial polynomials x^n and the polynomial sequence [x, x^2, x^2*(x - 1), x^2*(x - 1)^2, x^2*(x - 1)^2*(x - 2), x^2*(x - 1)^2*(x - 2)^2, ...]. An example is given below.
Except for differences in offset, this triangle is the Galton array G(floor(k/2),1) in the notation of Neuwirth with inverse array G(-floor(n/2),1).
Essentially the same as A256161. - Peter Bala, Apr 14 2018
From Peter Bala, Feb 10 2020: (Start)
The sums S(n):= Sum_{k >= 0} k^n*(x^k/k!)^2, n = 2,3,4,..., can be expressed as a linear combination of the sums S(0) and S(1) with polynomial coefficients, namely, S(n) = E(n,x)*S(0) + (1/x)*O(n,x)* S(1,x), where E(n,x) = Sum_{k >= 1} T(n,2*k)*x^(2*k) and O(n,x) = Sum_{k >= 0} T(n,2*k+1)*x^(2*k+1) are the even and odd parts of the n-th row polynomial of this array. This result is the analog of the Dobinski formula Sum_{k >= 0} (k^n)*x^k/k! = exp(x)*Bell(n,x), where Bell(n,x) is the n-th row polynomial of A048993.
For example, for n = 6 we have S(6) = Sum_{k >= 1} k^6*(x^k/k!)^2 = (x^2 + 11*x^4 + x^6) * Sum_{k >= 0} (x^k/k!)^2 + (1/x)*(4*x^3 + 6*x^5) * Sum_{k >= 1} k*(x^k/k!)^2.
Setting x = 1 in the above result gives Sum_{k >= 0} k^n*/k!^2 = A000994(n)*Sum_{k >= 0} 1/k!^2 + A000995(n)*Sum_{k >= 1} k/k!^2. See A086880. (End)

Examples

			Triangle begins
n\k| 1    2    3    4    5    6    7    8
1  | 1
2  | 0    1
3  | 0    1    1
4  | 0    1    2    1
5  | 0    1    3    4    1
6  | 0    1    4   11    6    1
7  | 0    1    5   26   23    9    1
8  | 0    1    6   57   72   50   12    1
...
Connection constants: Row 6 = (0, 1, 4, 11, 6, 1) so
x^6 = x^2 + 4*x^2*(x - 1) + 11*x^2*(x - 1)^2 + 6*x^2*(x - 1)^2*(x - 2) + x^2*(x - 1)^2*(x - 2)^2.
Row 5 = [0, 1, 3, 4, 1]. There are 9 set partitions of {1,2,3,4,5} of the type described in the Name section:
= = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Number of      Set partitions                Count
blocks
= = = = = = = = = = = = = = = = = = = = = = = = = = = = =
2                {1}{2,3,4,5}                   1
3           {1}{2,4,5}{3}, {1}{2,3,5}{4},
            {1}{2,3,4}{5}                       3
4          {1}{2,3}{4}{5}, {1}{2,4}{3}{5},
           {1}{2,5}{3}{4}, {1}{2}{3}{4,5}       4
5          {1}{2}{3}{4}{5}                      1
		

Crossrefs

Cf. A000295 (column 4), A007476 (row sums), A008277, A045618 (column 5), A048993, A246117 (unsigned matrix inverse), A256161, A000994, A000995, A086880.

Programs

  • Mathematica
    Flatten[Table[Table[Sum[StirlingS2[j,Floor[k/2]] * StirlingS2[n-j-1,Floor[(k-1)/2]],{j,0,n-1}],{k,1,n}],{n,1,12}]] (* Vaclav Kotesovec, Feb 09 2015 *)

Formula

T(n,k) = Sum_{i = 0..n-1} Stirling2(i, floor(k/2))*Stirling2(n-i-1, floor((k - 1)/2)) for n,k >= 1.
Recurrence equation: T(1,1) = 1, T(n,1) = 0 for n >= 2; T(n,k) = 0 for k > n; otherwise T(n,k) = floor(k/2)*T(n-1,k) + T(n-1,k-1).
O.g.f. (with an extra 1): A(z) = 1 + Sum_{k >= 1} (x*z)^k/( ( Product_{i = 1..floor((k-1)/2)} (1 - i*z) ) * ( Product_{i = 1..floor(k/2)} (1 - i*z) ) ) = 1 + x*z + x^2*z^2 + (x^2 + x^3)*z^3 + (x^2 + 2*x^3 + x^4)*z^4 + .... satisfies A(z) = 1 + x*z + x^2*z^2/(1 - z)*A(z/(1 - z)).
k-th column generating function z^k/( ( Product_{i = 1..floor((k-1)/2)} (1 - i*z) ) * ( Product_{i = 1..floor(k/2)} (1 - i*z) ) ).
Recurrence for row polynomials: R(n,x) = x^2*Sum_{k = 0..n-2} binomial(n-2,k)*R(k,x) with initial conditions R(0,x) = 1 and R(1,x) = x. Compare with the recurrence satisfied by the Bell polynomials: Bell(n,x) = x*Sum_{k = 0..n-1} binomial(n-1,k) * Bell(k,x).
Row sums are A007476.

A088022 a(n) = floor(sum_{k>=0} k^n /(k!)^3); related to generalized Bell numbers.

Original entry on oeis.org

2, 1, 1, 2, 3, 6, 12, 28, 68, 176, 484, 1409, 4334, 14002, 47357, 167157, 614297, 2345730, 9290084, 38092233, 161436136, 706061825, 3182452003, 14764717643, 70429572474, 345075959701, 1734987079149, 8943648710357, 47228775626154
Offset: 0

Views

Author

Paul D. Hanna, Sep 19 2003

Keywords

Examples

			a(8) = 68 = floor(17*2.1297 + 12*1.2641 + 11*1.5428) = floor(68.3463).
		

Crossrefs

Formula

B(n) := sum_{k>=0} k^n/(k!)^3 = A000996(n)*B(0) + A000997(n)*B(1) + A000998(n)*B(2) where B(0)=2.129702548983..., B(1)=1.264181150389..., B(2)=1.542838638501...; observe that these shift 3 places left under binomial transform: A000996={1, 0, 0, 1, 1, 1, 2, 6, 17, 44, 112, 304, 918, ...}, A000997={0, 1, 0, 0, 1, 2, 3, 5, 12, 36, 110, 326, 963, ...}, A000998={0, 0, 1, 0, 0, 1, 3, 6, 11, 24, 69, 227, 753, ...}; here A000998 is offset with 5 leading terms: {0, 0, 1, 0, 0}.
Showing 1-5 of 5 results.