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

A378849 a(n) is the total number of paths starting at (0,0), ending at (n,0), consisting of steps (1,1), (1,0), (1,-2), and staying on or above y = -1.

Original entry on oeis.org

1, 1, 1, 3, 9, 21, 48, 120, 309, 787, 2011, 5215, 13652, 35894, 94823, 251889, 672285, 1801185, 4842757, 13064059, 35349463, 95912989, 260896318, 711338596, 1943690464, 5321704006, 14597781706, 40112702176, 110404515703, 304338523999, 840140172621, 2322386563353
Offset: 0

Views

Author

Emely Hanna Li Lobnig, Dec 09 2024

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, [1$3, 3][n+1],
          (2*(8*n^3+3*n^2-25*n-6)*a(n-1)-2*(n-1)*(12*n^2-9*n-10)*
           a(n-2)+(43*n+13)*(n-1)*(n-2)*a(n-3)-31*(n-1)*(n-2)*
            (n-3)*a(n-4))/(2*(2*n+3)*(n+3)*(n-2)))
        end:
    seq(a(n), n=0..31);  # Alois P. Heinz, Dec 09 2024
  • PARI
    a(n) = sum(k=0, floor(n/3), binomial(n, k*3)*binomial(3*k+1, k)/(k+1)) \\ Thomas Scheuerle, Dec 09 2024

Formula

a(n) = hypergeom([4/3, (1-n)/3, (2-n)/3, -n/3], [1/3, 3/2, 2], -27/4). - Peter Luschny, Dec 18 2024

Extensions

More terms from Alois P. Heinz, Dec 09 2024

A379462 a(n) is the total number of paths starting at (0, 0), ending at (n, 0), consisting of steps (1, 1), (1, 0), (1, -2), and staying on or above y = -3.

Original entry on oeis.org

1, 1, 1, 4, 13, 31, 75, 204, 561, 1499, 4001, 10814, 29364, 79704, 216672, 590764, 1614421, 4419049, 12116139, 33277722, 91546143, 252209535, 695803659, 1922166420, 5316714156, 14723570406, 40820144106, 113293243636, 314759548879, 875342190283, 2436582442381
Offset: 0

Views

Author

Emely Hanna Li Lobnig, Dec 23 2024

Keywords

Examples

			For n = 3, the a(3)=4 paths are DUU, HHH, UDU, UUD, where U=(1,1), D=(1,-2) and H=(1,0). An example of a path with these steps, but not staying on or above y = -3, is for n=6: DDUUUU.
		

Crossrefs

Programs

  • PARI
    lista(nn) = my(v=vector(nn+5), w); print1(v[4]=1); for(n=1, nn, w=v; for(i=1, n+3, w[i]+=v[i+2]; w[i+1]+=v[i]); v=w; print1(", ", v[4])); \\ Jinyuan Wang, Jan 07 2025

Formula

a(n) = Sum_{k=0..floor(n/3)} 2*binomial(n, k*3)*(binomial(3*k+3, k)/(k+2) - binomial(3*k, k-1)/(k+1)). - Thomas Scheuerle, Jan 07 2025
a(n) ~ 23 * (1 + 3/2^(2/3))^(n + 3/2) / (4 * sqrt(3*Pi) * n^(3/2)). - Vaclav Kotesovec, Jan 15 2025

Extensions

More terms from Jinyuan Wang, Jan 07 2025
Showing 1-2 of 2 results.