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-10 of 79 results. Next

A033321 Binomial transform of Fine's sequence A000957: 1, 0, 1, 2, 6, 18, 57, 186, ...

Original entry on oeis.org

1, 1, 2, 6, 21, 79, 311, 1265, 5275, 22431, 96900, 424068, 1876143, 8377299, 37704042, 170870106, 779058843, 3571051579, 16447100702, 76073821946, 353224531663, 1645807790529, 7692793487307, 36061795278341, 169498231169821
Offset: 0

Views

Author

Keywords

Comments

Number of permutations avoiding the patterns {2431,4231,4321}; number of weak sorting class based on 2431. - Len Smiley, Nov 01 2005
Number of permutations avoiding the patterns {2413, 3142, 2143}. - Vincent Vatter, Aug 16 2006
Number of permutations avoiding the patterns {2143, 3142, 4132}. - Alexander Burstein and Jonathan Bloom, Aug 03 2013
Number of unimodal Lehmer codes. Those are exactly the inversion sequences for permutations avoiding the patterns {2143, 3142, 4132}. - Alexander Burstein, Jun 16 2015
Number of skew Dyck paths of semilength n ending with a down step (1,-1). A skew Dyck path is a path in the first quadrant which begins at the origin, ends on the x-axis, consists of steps U=(1,1)(up), D=(1,-1)(down) and L=(-1,-1)(left) so that up and left steps do not overlap. The length of the path is defined to be the number of its steps. Number of skew Dyck paths of semilength n and ending with a left step is A128714(n). - Emeric Deutsch, May 11 2007
Number of permutations sortable by a pop stack followed directly by a stack. Equivalently, the number of permutations avoiding {2431, 3142, 3241}. - Vincent Vatter, Mar 06 2013
Hankel transform of this sequence gives A000012 = [1,1,1,1,1,1,...]. - Philippe Deléham, Oct 24 2007
Starting with offset 1, Hankel transform = odd-indexed Fibonacci numbers. - Gary W. Adamson, Dec 27 2008
Starting with offset 1 = INVERT transform of A002212: (1, 1, 3, 10, 36, 137, ...). - Gary W. Adamson, May 19 2009
Equals INVERTi transform of A007317: (1, 2, 5, 15, 51, 188, ...). - Gary W. Adamson, May 17 2009
Number of sequences (e(1), ..., e(n)), 0 <= e(i) < i, such that there is no triple i < j < k with e(i) > e(j) < e(k). [Martinez and Savage, 2.20] - Eric M. Schmidt, Jul 17 2017
From David Callan, Jul 21 2017: (Start)
a(n) is the number of permutations of [n] in which the excedances and subcedances are both increasing. (For example, the 3 permutations of [4] NOT counted by a(4)=21 are 3421, 4312, 4321 with excedances/subcedances 34/21, 43/12, 43/21 respectively.)
Proof. It suffices to show that (*) the number of such permutations of [n] containing k fixed points is binomial(n,k)*F(n-k), where F is the Fine number A000957. Since F(n) is the number of 321-avoiding derangements of [n] and because inserting or deleting a fixed point in a permutation does not change the excedance/fixed point/subcedance status of any other entry, (*) is an immediate consequence of the following claim: The excedances and subcedances of a permutation p are both increasing if and only if p avoids 321. The claim is a nice exercise utilizing the cycles of p for the "if" direction and the pigeonhole principle for the "only if" direction. (End)
Conjectured to be the number of permutations of length n that are sorted to the identity by a consecutive-231-avoiding stack followed by a classical-21-avoiding stack. - Colin Defant, Aug 30 2020
a(n) is the number of permutations of length n avoiding the partially ordered pattern (POP) {3>1, 3>4, 1>2} of length 4. That is, the number of length n permutations having no subsequences of length 4 in which the third element is the largest and the first element is larger than the second element. - Sergey Kitaev, Dec 10 2020

Crossrefs

Programs

  • Maple
    a[0] := 1: a[1] := 1: a[2] := 2: for n from 3 to 23 do a[n] := ((13*n-5)*a[n-1]-(16*n-23)*a[n-2]+5*(n-2)*a[n-3])/2/(n+1) od;
  • Mathematica
    f[n_] := Sum[Binomial[n, k]*g[n - k], {k, 0, n}]; g[n_] := Sum[(-1)^(m + n)(n + m)!/n!/m!(n - m + 1)/(n + 1), {m, 0, n}]; Table[ f[n], {n, 24}] (* Robert G. Wilson v, Nov 04 2005 *)
  • Maxima
    a(n):=sum(sum(binomial(n-m-1,k-1)*m/(k+m)*binomial(2*k+m-1,k+m-1),k,1,n-m),m,1,n-1)+1; /* Vladimir Kruchinin, May 12 2011 */
    
  • PARI
    a(n)=1+sum(m=1,n-1,sum(k=1,n-m,binomial(n-m-1,k-1)/(k+m)* binomial(2*k+m-1,k+m-1)*m)) \\ Charles R Greathouse IV, Mar 06 2013
    
  • PARI
    x='x+O('x^50); Vec(2/(1+x+sqrt(1-6*x+5*x^2))) \\ Altug Alkan, Oct 22 2015

Formula

Also REVERT transform of x*(2*x-1)/(x^2+x-1). - Olivier Gérard
G.f.: 2/(1 + x + sqrt(1 - 6*x + 5*x^2)).
D-finite with recurrence a(n) = ((13*n-5)*a(n-1) - (16*n-23)*a(n-2) + 5*(n-2)*a(n-3))/(2*(n+1)) (n>=3); a(0)=a(1)=1, a(2)=2. - Emeric Deutsch, Mar 21 2004
Binomial transform of Fine's sequence: a(n) = Sum_{k=0..n} binomial(n, k)*A000957(n-k).
G.f.: 1/(1-x-x^2/(1-3x-x^2/(1-3x-x^2/(1-3x-x^2/(1-... (continued fraction). - Paul Barry, Jun 15 2009
a(n) = Sum_{k=0..n} A091965(n,k)*(-2)^k. - Philippe Deléham, Nov 28 2009
a(n) = 1 + Sum_{m=1..n-1} Sum_{k=1..n-m} binomial(n-m-1, k-1)*(m/(k+m))*binomial(2*k+m-1, k+m-1). - Vladimir Kruchinin, May 12 2011
a(n) = upper left term in M^n, M = the production matrix:
1, 1, 0, 0, 0, 0, 0, ...
1, 2, 1, 0, 0, 0, 0, ...
1, 2, 1, 1, 0, 0, 0, ...
1, 2, 1, 2, 1, 0, 0, ...
1, 2, 1, 2, 1, 1, 0, ...
1, 2, 1, 2, 1, 2, 1, ...
...
- Gary W. Adamson, Jul 08 2011
a(n) ~ 5^(n+3/2)/(18*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Aug 09 2013
G.f.: 1/(1-x*C(x/(1-x))), where C(x) = g.f. for A000108(n). - Alexander Burstein, Oct 05 2014

Extensions

More terms from Robert G. Wilson v, Nov 04 2005
Entry revised by N. J. A. Sloane, Aug 07 2006

A138415 Binomial transform of A000957.

Original entry on oeis.org

0, 1, 2, 4, 10, 31, 110, 421, 1686, 6961, 29392, 126292, 550360, 2426503, 10803802, 48507844, 219377950, 998436793, 4569488372, 21016589074, 97090411020, 450314942683, 2096122733212, 9788916220519, 45850711498860, 215348942668681, 1013979873542690, 4785437476592806
Offset: 0

Views

Author

N. J. A. Sloane, May 08 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Binomial[n, k]*(2^k * (2*k-1)!! * Hypergeometric2F1Regularized[2, 2*k+1, k+2, -1] - 3*(-1)^k/2^(k+1)), {k, 1, n}], {n, 0, 30}] (* Vaclav Kotesovec, Oct 30 2017 *)
    RecurrenceTable[{a[0]==0,a[1]==1,a[2]==2,a[3]==4,a[n]==(3(5n-6)a[n-1]-(29n-57) a[n-2]+3(7n-18)a[n-3]-5(n-3)a[n-4])/(2n)},a,{n,30}] (* Harvey P. Dale, Nov 22 2022 *)

Formula

From Vaclav Kotesovec, Oct 30 2017: (Start)
Recurrence: 2*n*a(n) = 3*(5*n - 6)*a(n-1) - (29*n - 57)*a(n-2) + 3*(7*n - 18)*a(n-3) - 5*(n-3)*a(n-4).
a(n) ~ 5^(n + 3/2) / (72 * sqrt(Pi) * n^(3/2)). (End)

A138413 A bisection of A000957.

Original entry on oeis.org

0, 0, 2, 18, 186, 2120, 25724, 325878, 4260282, 57048048, 778483932, 10786724388, 151355847012, 2146336125648, 30711521221376, 442862000693438, 6429286894263738, 93891870710425440, 1378379704593824300, 20330047491994213884, 301111732041234778316, 4476705468260134734384, 66784808491631598524136
Offset: 0

Views

Author

N. J. A. Sloane, May 08 2008

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<3, n*(2-n),
          ((7*n-12)*b(n-1)+(4*n-6)*b(n-2))/(2*n))
        end:
    a:= n-> b(2*n):
    seq(a(n), n=0..25);  # Alois P. Heinz, Apr 26 2023
  • Python
    from itertools import count, islice
    def A138413_gen(): # generator of terms
        yield from (0,0)
        a, c = 0, 1
        for n in count(1,2):
            a = (c:=c*((n<<2)+2)//(n+2))-a>>1
            yield (a:=(c:=c*((n+1<<2)+2)//(n+3))-a>>1)
    A138413_list = list(islice(A138413_gen(),20)) # Chai Wah Wu, Apr 26 2023

Formula

Conjecture: D-finite with recurrence 4*n*(2*n-1)*(7*n-13)*a(n) +(-910*n^3+3489*n^2-4277*n+1680)*a(n-1) +2*(4*n-7)*(7*n-6)*(4*n-5)*a(n-2)=0. Telescoping would provide another recurrence for A000957. - R. J. Mathar, Jun 26 2020

A138414 A bisection of A000957.

Original entry on oeis.org

1, 1, 6, 57, 622, 7338, 91144, 1174281, 15548694, 210295326, 2892818244, 40347919626, 569274150156, 8110508473252, 116518215264492, 1686062250699433, 24552388991392230, 359526085719652662, 5290709340633314596, 78201907647506243758, 1160507655117628665252, 17283862221822154612428, 258257655550682547281952
Offset: 0

Views

Author

N. J. A. Sloane, May 08 2008

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<3, n*(2-n),
          ((7*n-12)*b(n-1)+(4*n-6)*b(n-2))/(2*n))
        end:
    a:= n-> b(2*n+1):
    seq(a(n), n=0..25);  # Alois P. Heinz, Apr 26 2023
  • PARI
    x='x+O('x^100);  v=Vec((1-sqrt(1-4*x))/(3-sqrt(1-4*x)));
    vector(#v\2,n,v[2*n-1]) /* show terms */
    
  • Python
    from itertools import count, islice
    def A138414_gen(): # generator of terms
        yield 1
        a, c = 0, 1
        for n in count(1,2):
            yield (a:=(c:=c*((n<<2)+2)//(n+2))-a>>1)
            a=(c:=c*((n+1<<2)+2)//(n+3))-a>>1
    A138414_list = list(islice(A138414_gen(),20)) # Chai Wah Wu, Apr 26 2023

Formula

a(n) = A000957(2*n+1).

A138461 Inverse binomial transform of A000957.

Original entry on oeis.org

0, 1, -2, 4, -6, 11, -14, 29, -26, 85, -12, 320, 312, 1639, 3190, 10484, 25822, 75005, 200488, 564662, 1555804, 4363139, 12184456, 34267931, 96435100, 272390561, 770734846, 2186278294, 6213111234
Offset: 0

Views

Author

N. J. A. Sloane, May 08 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[(-1)^(n-k) * Binomial[n, k]*(2^k * (2*k-1)!! * Hypergeometric2F1Regularized[2, 2*k+1, k+2, -1] - 3*(-1)^k/2^(k+1)), {k, 1, n}], {n, 0, 30}] (* Vaclav Kotesovec, Oct 30 2017 *)

Formula

From Vaclav Kotesovec, Oct 30 2017: (Start)
Recurrence: 2*n*a(n) = -(n+6)*a(n-1) + (13*n - 33)*a(n-2) + 3*(7*n - 18)*a(n-3) + 9*(n-3)*a(n-4).
a(n) ~ 3^(n - 1/2) / (8 * sqrt(Pi) * n^(3/2)). (End)

A187913 Generalized Riordan array based on the Fine's numbers A000957.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 4, 1, 1, 6, 10, 5, 2, 1, 18, 32, 13, 9, 2, 1, 57, 100, 44, 28, 10, 3, 1, 186, 329, 142, 100, 32, 15, 3, 1, 622, 1101, 480, 344, 119, 55, 16, 4, 1, 2120, 3761, 1640, 1214, 420, 216, 60, 22, 4, 1, 7338, 13035, 5698, 4300, 1517, 810, 243, 92, 23, 5, 1
Offset: 0

Views

Author

Paul Barry, Mar 15 2011

Keywords

Comments

First column is the Fine's numbers A000957. Row sums are A000958. Inverse binomial transform of A187914.

Examples

			Triangle begins
1,
0, 1,
1, 1, 1,
2, 4, 1, 1,
6, 10, 5, 2, 1,
18, 32, 13, 9, 2, 1,
57, 100, 44, 28, 10, 3, 1,
186, 329, 142, 100, 32, 15, 3, 1,
622, 1101, 480, 344, 119, 55, 16, 4, 1,
2120, 3761, 1640, 1214, 420, 216, 60, 22, 4, 1,
7338, 13035, 5698, 4300, 1517, 810, 243, 92, 23, 5, 1
Production matrix is
0, 1,
1, 1, 1,
1, 2, 0, 1,
1, 2, 1, 1, 1,
1, 2, 1, 2, 0, 1,
1, 2, 1, 2, 1, 1, 1,
1, 2, 1, 2, 1, 2, 0, 1,
1, 2, 1, 2, 1, 2, 1, 1, 1,
1, 2, 1, 2, 1, 2, 1, 2, 0, 1
Thus
57=1.0+0.18+1.32+1.13+1.9+1.2+1.1;
100=1.18+1.32+2.13+2.9+2.2+2.1;
44=1.32+0.13+1.9+1.2+1.1
		

Formula

Let g(x)=(1+2x-sqrt(1-4x))/(2x(2+x)) be the g.f. of the Fine's numbers A000957. Then column k has
g.f. x^k*g(x)^(k+1)/(1-xg(x)-x^2g(x)^2)^floor((k+1)/2).

A187914 Generalized Riordan array based on the binomial transform of the Fine's numbers A000957.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 6, 10, 4, 1, 21, 36, 15, 6, 1, 79, 137, 58, 29, 7, 1, 311, 543, 232, 132, 37, 9, 1, 1265, 2219, 954, 590, 179, 57, 10, 1, 5275, 9285, 4010, 2628, 837, 315, 68, 12, 1, 22431, 39587, 17156, 11732, 3861, 1629, 396, 94, 13, 1, 96900, 171369, 74469, 52608, 17726, 8127, 2133, 612, 108, 15, 1
Offset: 0

Views

Author

Paul Barry, Mar 15 2011

Keywords

Comments

Row sums are A033321(n+1). Second column is A002212(n+1). Equal to A007318*A187913.

Examples

			Triangle begins
1,
1, 1,
2, 3, 1,
6, 10, 4, 1,
21, 36, 15, 6, 1,
79, 137, 58, 29, 7, 1,
311, 543, 232, 132, 37, 9, 1,
1265, 2219, 954, 590, 179, 57, 10, 1,
5275, 9285, 4010, 2628, 837, 315, 68, 12, 1,
22431, 39587, 17156, 11732, 3861, 1629, 396, 94, 13, 1
Production matrix is
1, 1,
1, 2, 1,
1, 2, 1, 1,
1, 2, 1, 2, 1,
1, 2, 1, 2, 1, 1,
1, 2, 1, 2, 1, 2, 1,
1, 2, 1, 2, 1, 2, 1, 1,
1, 2, 1, 2, 1, 2, 1, 2, 1,
1, 2, 1, 2, 1, 2, 1, 2, 1, 1;
Hence, for instance, we have
79=1*0+1.21+1.36+1.15+1.6+1.1;
137=1.21+2.36+2.15+2.6+2.1;
58=1.36+1.15+1.6+1.1
		

Formula

Let g(x)=(1+x-sqrt(1-6x+5x^2))/(2x(2-x)) be the g.f. of A033321, the binomial transform of the Fine numbers.
Then the g.f. of the k-th column is x^k*g(x)^((k+2)/2)/(1-2*x*g(x))^(k/2) if k is even, and
x^k*g(x)^((k+1)/2)/(1-2*x*g(x))^((k+1)/2) if k is odd. Otherwise put, column k has g.f.
g.f. x^k*g(x)^(k+1)/(1-xg(x)-x^2g(x)^2)^floor((k+1)/2).

A171616 Triangle T : T(n,k)= binomial(n,k)*A000957(n+1-k).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 6, 8, 6, 0, 1, 18, 30, 20, 10, 0, 1, 57, 108, 90, 40, 15, 0, 1, 186, 399, 378, 210, 70, 21, 0, 1, 622, 1488, 1596, 1008, 420, 112, 28, 0, 1, 2120, 5598, 6696, 4788, 2268, 756, 168, 36, 0, 1, 7338, 21200, 27990, 22320, 11970, 4536, 1260, 240, 45
Offset: 0

Views

Author

Philippe Deléham, Dec 13 2009

Keywords

Examples

			Triangle begins : 1 ; 0,1 ; 1,0,1 ; 2,3,0,1 ; 6,8,6,0,1 ; 18,30,20,10,0,1 ; ...
		

Crossrefs

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^k = A000957(n+1), A033321(n), A033543(n) for x = 0,1,2 respectively. Sum_{k, 0<=k<=n} T(n,k)*(-1)^(n-k)*x^k = A054341(n), A059738(n), A049027(n+1) for x = 2,3,4 respectively.

A187894 Numerators of expansion of sqrt(F-1) where F is the g.f. for A000957.

Original entry on oeis.org

0, 1, 1, 5, 13, 151, 463, 2957, 9725, 261739, 896507, 6231571, 21920539, 311583955, 1116869179, 8066939069, 29323723037, 1715310801971, 6303146700755, 46534580965463, 172479371522639, 2566609537700489, 9580228898547889, 71737644622567835, 269340391562396747, 8110742483462690623, 30602551916179033519
Offset: 0

Views

Author

N. J. A. Sloane, Mar 15 2011

Keywords

Comments

The denominators are powers of 2.

Examples

			0, 1, 1, 5/2, 13/2, 151/8, 463/8, 2957/16, 9725/16, 261739/128, 896507/128,  ...
		

References

  • L. W. Shapiro and C. J. Wang, Generating identities via 2 X 2 matrices, Congressus Numerantium, 205 (2010), 33-46.

Crossrefs

Cf. A000957.

A192675 Floor-Sqrt transform of large Fine numbers (A000957).

Original entry on oeis.org

0, 1, 0, 1, 1, 2, 4, 7, 13, 24, 46, 85, 160, 301, 570, 1083, 2064, 3943, 7553, 14501, 27901, 53784, 103859, 200867, 389044, 754502, 1465037, 2847895, 5541797, 10794360, 21044286, 41061688, 80182834, 156692019, 306417804, 599604941, 1174044166, 2300154199, 4508885393, 8843184248
Offset: 0

Views

Author

Emanuele Munarini, Jul 07 2011

Keywords

Crossrefs

Cf. A000957.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<3, n*(2-n),
          ((7*n-12)*b(n-1)+(4*n-6)*b(n-2))/(2*n))
        end:
    a:= n-> floor(sqrt(b(n))):
    seq(a(n), n=0..40);  # Alois P. Heinz, Apr 26 2023
  • Mathematica
    FSFromSeries[f_,x_,n_] := Map[Floor[Sqrt[#]]&,CoefficientList[Series[f,{x,0,n}],x]]
    FSFromSeries[(1+2x-Sqrt[1-4x])/(2x(2+x)),x,100]
  • Python
    from math import isqrt
    from itertools import count, islice
    def A192675_gen(): # generator of terms
        yield from (0,1,0)
        a, c = 0, 1
        for n in count(1):
            yield isqrt(a:=(c:=c*((n<<2)+2)//(n+2))-a>>1)
    A192675_list = list(islice(A192675_gen(),20)) # Chai Wah Wu, Apr 26 2023

Formula

a(n) = floor(sqrt(Fine(n))).

Extensions

a(0) inserted by Chai Wah Wu, Apr 26 2023
Showing 1-10 of 79 results. Next