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 11 results. Next

A056326 Number of reversible string structures with n beads using exactly two different colors.

Original entry on oeis.org

0, 1, 2, 5, 9, 19, 35, 71, 135, 271, 527, 1055, 2079, 4159, 8255, 16511, 32895, 65791, 131327, 262655, 524799, 1049599, 2098175, 4196351, 8390655, 16781311, 33558527, 67117055, 134225919, 268451839, 536887295, 1073774591, 2147516415, 4295032831, 8590000127
Offset: 1

Views

Author

Keywords

Comments

A string and its reverse are considered to be equivalent. Permuting the colors will not change the structure.

References

  • M. R. Nester (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]

Crossrefs

Column k=2 of A284949 and of A291883.
Cf. A056309.

Programs

  • Mathematica
    Table[(StirlingS2[n,2] + StirlingS2[Floor[n/2]+1,2])/2, {n,1,30}] (* Robert A. Russell, Jan 29 2018 *)
    LinearRecurrence[{3, 0, -6, 4}, {0, 1, 2, 5}, 35] (* or *)
    Rest@ CoefficientList[Series[x^2*(x^2 + x - 1)/((x - 1) (2 x - 1) (2 x^2 - 1)), {x, 0, 35}], x] (* Michael De Vlieger, Jan 31 2018 *)

Formula

a(n) = A005418(n) - 1.
From Colin Barker, Nov 25 2012: (Start)
a(n) = 3*a(n-1) - 6*a(n-3) + 4*a(n-4).
G.f.: x^2*(x^2+x-1)/((x-1)*(2*x-1)*(2*x^2-1)). (End)

A291885 Number of symmetrically unique Dyck paths of semilength 2n and height n.

Original entry on oeis.org

1, 1, 5, 31, 252, 2117, 18546, 164229, 1469596, 13229876, 119712521, 1087573357, 9914033252, 90633332870, 830621140260, 7628813061585, 70200092854044, 647070588612140, 5973385906039684, 55217660246861884, 511054426374819184, 4735208302827742549
Offset: 0

Views

Author

Alois P. Heinz, Sep 05 2017

Keywords

Crossrefs

Cf. A291883.

Programs

  • Maple
    b:= proc(x, y, k) option remember; `if`(x=0, 1, `if`(y+1<=min(k,
            x-1), b(x-1, y+1, k), 0)+`if`(y>0, b(x-1, y-1, k), 0))
        end:
    g:= proc(x, y, k) option remember; `if`(x=0, 1, `if`(y>0,
          g(x-2, y-1, k), 0)+ `if`(y+1<=k, g(x-2, y+1, k), 0))
        end:
    a:= n-> `if`(n=0, 1, (b(4*n, 0, n)  +g(4*n, 0, n)
                         -b(4*n, 0, n-1)-g(4*n, 0, n-1))/2):
    seq(a(n), n=0..30);
  • Mathematica
    b[x_, y_, k_] := b[x, y, k] = If[x == 0, 1, If[y + 1 <= Min[k, x - 1], b[x - 1, y + 1, k], 0] + If[y > 0, b[x - 1, y - 1, k], 0]];
    g[x_, y_, k_] := g[x, y, k] = If[x == 0, 1, If[y > 0, g[x - 2, y - 1, k], 0] + If[y + 1 <= k, g[x - 2, y + 1, k], 0]];
    a[n_] := If[n == 0, 1, (b[4n, 0, n] + g[4n, 0, n] - b[4n, 0, n - 1] - g[4n, 0, n - 1])/2];
    Array[a, 30, 0] (* Jean-François Alcover, May 31 2019, after Alois P. Heinz *)
  • Python
    from sympy.core.cache import cacheit
    @cacheit
    def b(x, y, k): return 1 if x==0 else (b(x - 1, y + 1, k) if y + 1<=min(k, x - 1) else 0) + (b(x - 1, y - 1, k) if y>0 else 0)
    @cacheit
    def g(x, y, k): return 1 if x==0 else (g(x - 2, y - 1, k) if y>0 else 0) + (g(x - 2, y + 1, k) if y + 1<=k else 0)
    def a(n): return 1 if n==0 else (b(4*n, 0, n) + g(4*n, 0, n) - b(4*n, 0, n - 1) - g(4*n, 0, n - 1))//2
    print([a(n) for n in range(31)]) # Indranil Ghosh, Sep 06 2017

Formula

a(n) = A291883(2n,n).

A291886 Total height of all symmetrically unique Dyck paths of semilength n.

Original entry on oeis.org

0, 1, 3, 8, 24, 73, 239, 808, 2839, 10173, 37107, 136778, 508622, 1902931, 7156180, 27020991, 102387426, 389129477, 1482851762, 5664065704, 21681357734, 83154466615, 319486977769, 1229491584784, 4738571829454, 18288152053984, 70672285064968, 273430196389027
Offset: 0

Views

Author

Alois P. Heinz, Sep 05 2017

Keywords

Crossrefs

Cf. A291883.

Formula

a(n) = Sum_{k=1..n} k * A291883(n,k)

A291887 Number of symmetrically unique Dyck paths of semilength n and height three.

Original entry on oeis.org

1, 3, 11, 31, 91, 250, 690, 1863, 5017, 13389, 35621, 94354, 249352, 657421, 1730685, 4550031, 11950963, 31365810, 82274126, 215711947, 565376593, 1481448697, 3881041065, 10165822434, 26624745964, 69725071281, 182583838181, 478093234315, 1251829592839
Offset: 3

Views

Author

Alois P. Heinz, Sep 05 2017

Keywords

Crossrefs

Column k=3 of A291883.

Formula

G.f.: -x^3*(x^4+2*x^2-3*x+1)/((2*x-1)*(x^2-3*x+1)*(2*x^2-1)*(x^2+x-1)).

A291888 Number of symmetrically unique Dyck paths of semilength n and height four.

Original entry on oeis.org

1, 4, 19, 69, 252, 855, 2867, 9339, 30085, 95524, 300796, 939228, 2915481, 9001380, 27675779, 84782673, 258956584, 788926699, 2398385803, 7277878707, 22050326805, 66718218120, 201640080056, 608808949752, 1836608777233, 5536482441124, 16679237438035
Offset: 4

Views

Author

Alois P. Heinz, Sep 05 2017

Keywords

Crossrefs

Column k=4 of A291883.

Formula

G.f.: x^4*(3*x^4-5*x^3+6*x^2-4*x+1)/((x-1)*(3*x-1)*(x^2-3*x+1)*(3*x^2-1)*(x^2+x-1)).

A291889 Number of symmetrically unique Dyck paths of semilength n and height five.

Original entry on oeis.org

1, 5, 29, 127, 540, 2117, 8063, 29688, 107237, 380549, 1333709, 4624308, 15899625, 54278502, 184209808, 622029353, 2091461574, 7006165827, 23394683289, 77899483723, 258750654760, 857596024194, 2836911700038, 9368339478043, 30889646001696, 101710568454396
Offset: 5

Views

Author

Alois P. Heinz, Sep 05 2017

Keywords

Crossrefs

Column k=5 of A291883.

Formula

G.f.: -x^5*(18*x^3-14*x^4+3*x^5-12*x^2+5*x-1) / ((x-1) *(3*x-1) *(3*x^2-1) *(x^3-2*x^2-x+1) *(x^3-6*x^2+5*x-1)).

A291890 Number of symmetrically unique Dyck paths of semilength n and height six.

Original entry on oeis.org

1, 6, 41, 209, 1005, 4411, 18546, 74854, 294293, 1131635, 4280686, 15974526, 58974616, 215772740, 783598381, 2827768273, 10149744903, 36261522803, 129027358151, 457486923079, 1617031493924, 5699720240694, 20040736126691, 70308818376855, 246171461366950
Offset: 6

Views

Author

Alois P. Heinz, Sep 05 2017

Keywords

Crossrefs

Column k=6 of A291883.

Formula

G.f.: x^6*(20*x^2-43*x^3+48*x^4-20*x^5+x^7-6*x+1) / ((2*x-1) *(2*x^2-4*x+1) *(x^3-2*x^2-x+1) *(x^3-6*x^2+5*x-1) *(2*x^4-4*x^2+1)).

A291891 Number of symmetrically unique Dyck paths of semilength n and height seven.

Original entry on oeis.org

1, 7, 55, 319, 1705, 8238, 37674, 164229, 692627, 2843282, 11433826, 45212792, 176385132, 680452948, 2600725892, 9862321095, 37150333241, 139139984973, 518538211261, 1924077739700, 7112221384554, 26201080984497, 96233327019085, 352501632479306
Offset: 7

Views

Author

Alois P. Heinz, Sep 05 2017

Keywords

Crossrefs

Column k=7 of A291883.

Programs

  • Mathematica
    CoefficientList[Series[-(6*x - 24*x^2 + 60*x^3 - 67*x^4 + 21*x^5 + x^6 + x^7 - 1)/((x - 1)*(2*x - 1)*(2*x^2 - 4*x + 1)*(x^3 + 3*x^2 - 1)*(x^3 - 9*x^2 + 6*x - 1)*(2*x^4 - 4*x^2 + 1)), {x, 0, 30}], x] (* Wesley Ivan Hurt, Oct 14 2023 *)

Formula

G.f.: -x^7*(6*x-24*x^2+60*x^3-67*x^4+21*x^5+x^6+x^7-1) / ((x-1) *(2*x-1) *(2*x^2-4*x+1) *(x^3+3*x^2-1) *(x^3-9*x^2+6*x-1) *(2*x^4-4*x^2+1)).

A291892 Number of symmetrically unique Dyck paths of semilength n and height eight.

Original entry on oeis.org

1, 8, 71, 461, 2706, 14235, 70161, 327469, 1469596, 6389144, 27097948, 112630404, 460511702, 1857372265, 7406424903, 29250500171, 114576069911, 445647539540, 1722814022086, 6624828067482, 25356181172529, 96650473757117, 367059233827762, 1389476976680608
Offset: 8

Views

Author

Alois P. Heinz, Sep 05 2017

Keywords

Crossrefs

Column k=8 of A291883.

Formula

G.f.: x^8*(-1+7*x-35*x^2+110*x^3-171*x^4+113*x^5-25*x^6+5*x^7) / ((x-1) *(x^2-3*x+1) *(5*x^2-5*x+1) *(x^3+3*x^2-1) *(x^3-9*x^2+6*x-1) *(5*x^4-5*x^2+1)).

A291893 Number of symmetrically unique Dyck paths of semilength n and height nine.

Original entry on oeis.org

1, 9, 89, 639, 4082, 23191, 122381, 607944, 2887756, 13229876, 58898404, 256121253, 1092452270, 4585149401, 18985099139, 77707979700, 314944855135, 1265638606115, 5048705160315, 20010229736469, 78861912700117, 309252947330313, 1207359268831473
Offset: 9

Views

Author

Alois P. Heinz, Sep 05 2017

Keywords

Crossrefs

Column k=9 of A291883.

Formula

G.f.: -x^9*(-1+9*x-56*x^2+230*x^3-548*x^4+741*x^5-564*x^6+238*x^7-55*x^8+5*x^9) / ((x^2-3*x+1) *(5*x^2-5*x+1) *(5*x^4-5*x^2+1) *(x^5-3*x^4-3*x^3+4*x^2+x-1) *(x^5-15*x^4+35*x^3-28*x^2+9*x-1)).
Showing 1-10 of 11 results. Next