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

A278391 Number of positive meanders (walks starting at the origin and ending at any altitude > 0 that never touch or go below the x-axis in between) with n steps from {-2,-1,0,1,2}.

Original entry on oeis.org

1, 2, 7, 29, 126, 565, 2583, 11971, 56038, 264345, 1254579, 5983628, 28655047, 137697549, 663621741, 3206344672, 15525816066, 75324830665, 366071485943, 1781794374016, 8684511754535, 42381025041490, 207055067487165, 1012617403658500, 4956924278927910
Offset: 0

Views

Author

David Nguyen, Nov 20 2016

Keywords

Comments

By convention, the empty walk (corresponding to n=0) is considered to be a positive meander.

Crossrefs

Programs

  • Mathematica
    frac[ex_] := Select[ex, Exponent[#, x] < 0&];
    seq[n_] := Module[{v, m, p}, v = Table[0, n]; m = Sum[x^i, {i, -2, 2}]; p = 1/x; v[[1]] = 1; For[i = 2, i <= n, i++, p = p*m // Expand; p = p - frac[p]; v[[i]] = p /. x -> 1]; v];
    seq[25] (* Jean-François Alcover, Jun 30 2018, after Andrew Howroyd *)
  • PARI
    seq(n)={my(v=vector(n), m=sum(i=-2, 2, x^i), p=1/x); v[1]=1; for(i=2, n, p*=m; p-=frac(p); v[i]=subst(p,x,1)); v} \\ Andrew Howroyd, Jun 27 2018

A278394 Number of positive meanders (walks starting at the origin and ending at any altitude > 0 that never touch or go below the x-axis in between) with n steps from {-2,-1,1,2}.

Original entry on oeis.org

1, 2, 5, 17, 58, 209, 761, 2823, 10557, 39833, 151147, 576564, 2208163, 8486987, 32714813, 126430229, 489685674, 1900350201, 7387530575, 28763059410, 112142791763, 437774109384, 1710883748796, 6693281604018, 26210038447737, 102724200946467, 402925631267151
Offset: 0

Views

Author

David Nguyen, Nov 20 2016

Keywords

Comments

By convention, the empty walk (corresponding to n=0) is considered to be a positive meander.

Crossrefs

Programs

  • Mathematica
    frac[ex_] := Select[ex, Exponent[#, x] < 0&];
    seq[n_] := Module[{v, m, p}, v = Table[0, n]; m = Sum[x^i, {i, -2, 2}] - 1; p = 1/x; v[[1]] = 1; For[i = 2, i <= n, i++, p = p*m // Expand; p = p - frac[p]; v[[i]] = p /. x -> 1]; v];
    seq[27] (* Jean-François Alcover, Jul 01 2018, after Andrew Howroyd *)
  • PARI
    seq(n)={my(v=vector(n), m=sum(i=-2, 2, x^i)-1, p=1/x); v[1]=1; for(i=2, n, p*=m; p-=frac(p); v[i]=subst(p,x,1)); v} \\ Andrew Howroyd, Jun 27 2018

A278392 Number of positive meanders (walks starting at the origin and ending at any altitude > 0 that never touch or go below the x-axis in between) with n steps from {-3,-2,-1,0,1,2,3}.

Original entry on oeis.org

1, 3, 15, 87, 530, 3329, 21316, 138345, 906853, 5989967, 39804817, 265812731, 1782288408, 11991201709, 80911836411, 547334588037, 3710610424765, 25204313298581, 171492983631249, 1168638213247713, 7974592724571446, 54484621312318007, 372671912259214487
Offset: 0

Views

Author

David Nguyen, Nov 20 2016

Keywords

Comments

By convention, the empty walk (corresponding to n=0) is considered to be a positive meander.

Crossrefs

Programs

  • Mathematica
    frac[ex_] := Select[ex, Exponent[#, x] < 0&];
    seq[n_] := Module[{v, m, p}, v = Table[0, n]; m = Sum[x^i, {i, -3, 3}]; p = 1/x; v[[1]] = 1; For[i = 2, i <= n, i++, p = p*m // Expand; p = p - frac[p]; v[[i]] = p /. x -> 1]; v];
    seq[23] (* Jean-François Alcover, Jul 01 2018, after Andrew Howroyd *)
  • PARI
    seq(n)={my(v=vector(n), m=sum(i=-3, 3, x^i), p=1/x); v[1]=1; for(i=2, n, p*=m; p-=frac(p); v[i]=subst(p,x,1)); v} \\ Andrew Howroyd, Jun 27 2018

A278393 Number of positive meanders (walks starting at the origin and ending at any altitude > 0 that never touch or go below the x-axis in between) with n steps from {-4,-3,-2,-1,0,1,2,3,4}.

Original entry on oeis.org

1, 4, 26, 194, 1521, 12289, 101205, 844711, 7120398, 60477913, 516774114, 4437360897, 38256405777, 330948944639, 2871299293535, 24973776734091, 217690276938940, 1901204163460913, 16632544424086901, 145730139895667887, 1278596503973570665, 11231908572986043199
Offset: 0

Views

Author

David Nguyen, Nov 20 2016

Keywords

Comments

By convention, the empty walk (corresponding to n=0) is considered to be a positive meander.

Crossrefs

Programs

  • Mathematica
    frac[ex_] := Select[ex, Exponent[#, x] < 0&];
    seq[n_] := Module[{v, m, p}, v = Table[0, n]; m = Sum[x^i, {i, -4, 4}]; p = 1/x; v[[1]] = 1; For[i = 2, i <= n, i++, p = p*m // Expand; p = p - frac[p]; v[[i]] = p /. x -> 1]; v];
    seq[22] (* Jean-François Alcover, Jul 01 2018, after Andrew Howroyd *)
  • PARI
    seq(n)={my(v=vector(n), m=sum(i=-4, 4, x^i), p=1/x); v[1]=1; for(i=2, n, p*=m; p-=frac(p); v[i]=subst(p,x,1)); v} \\ Andrew Howroyd, Jun 27 2018

A278395 Number of positive meanders (walks starting at the origin and ending at any altitude > 0 that never touch or go below the x-axis in between) with n steps from {-3,-2,-1,1,2,3}.

Original entry on oeis.org

1, 3, 12, 60, 311, 1674, 9173, 51002, 286384, 1620776, 9228724, 52810792, 303447096, 1749612736, 10117583749, 58656027314, 340806249367, 1984018271850, 11569932938192, 67574451148408, 395214184047366, 2314315680481252, 13567587349336459, 79621279809031310
Offset: 0

Views

Author

David Nguyen, Nov 20 2016

Keywords

Comments

By convention, the empty walk (corresponding to n=0) is considered to be a positive meander.

Crossrefs

Programs

  • Mathematica
    frac[ex_] := Select[ex, Exponent[#, x] < 0&];
    seq[n_] := Module[{v, m, p}, v = Table[0, n]; m = Sum[x^i, {i, -3, 3}] - 1; p = 1/x; v[[1]] = 1; For[i = 2, i <= n, i++, p = p*m // Expand; p = p - frac[p]; v[[i]] = p /. x -> 1]; v];
    seq[24] (* Jean-François Alcover, Jul 01 2018, after Andrew Howroyd *)
  • PARI
    seq(n)={my(v=vector(n), m=sum(i=-3, 3, x^i)-1, p=1/x); v[1]=1; for(i=2, n, p*=m; p-=frac(p); v[i]=subst(p,x,1)); v} \\ Andrew Howroyd, Jun 27 2018

A278416 Number of meanders (walks starting at the origin and ending at any altitude >= 0 that may touch but never go below the x-axis) with n steps from {-4,-3,-2,-1,1,2,3,4}.

Original entry on oeis.org

1, 4, 26, 174, 1231, 8899, 65492, 487646, 3664123, 27723979, 210946444, 1612394958, 12371547879, 95230159650, 735060394986, 5687343753535, 44096482961189, 342530654187820, 2665058975987628, 20765913987073659, 162019898098364055, 1265622208055843635
Offset: 0

Views

Author

Michael Wallner, Nov 21 2016

Keywords

Crossrefs

Programs

  • Mathematica
    seq[n_] := Module[{v = Table[1, n], m = Sum[ x^i, {i, -4, 4}] - 1, p = 1}, For[i = 2, i <= n, i++, p = Expand[p*m]; p = p - Select[p, Exponent[#, x] < 0&]; v[[i]] = (p /. x -> 1)]; v];
    seq[25] (* Jean-François Alcover, Jul 11 2018, after Andrew Howroyd *)
  • PARI
    seq(n)={my(v=vector(n), m=sum(i=-4, 4, x^i)-1, p=1); v[1]=1; for(i=2, n, p*=m; p-=frac(p); v[i]=subst(p,x,1)); v} \\ Andrew Howroyd, Jun 27 2018
Showing 1-6 of 6 results.