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

A111373 A generalized Pascal triangle.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 3, 0, 0, 1, 3, 0, 0, 4, 0, 0, 1, 0, 7, 0, 0, 5, 0, 0, 1, 0, 0, 12, 0, 0, 6, 0, 0, 1, 12, 0, 0, 18, 0, 0, 7, 0, 0, 1, 0, 30, 0, 0, 25, 0, 0, 8, 0, 0, 1, 0, 0, 55, 0, 0, 33, 0, 0, 9, 0, 0, 1, 55, 0, 0, 88, 0, 0, 42, 0, 0, 10, 0, 0, 1, 0, 143, 0, 0, 130, 0, 0, 52, 0, 0, 11, 0, 0, 1
Offset: 0

Views

Author

N. J. A. Sloane, Nov 09 2005

Keywords

Comments

First diagonal is A000012, the all 1's sequence. Second nonzero diagonal is A000027 = n. Third nonzero diagonal is A027379 = n*(n+5)/2 for n>=1, or essentially A000217(n) - 3. Fourth nonzero diagonal is A111396. - Jonathan Vos Post, Nov 10 2005
Row sums are A126042. - Paul Barry, Dec 16 2006

Examples

			Triangle begins:
   1;
   0,  1;
   0,  0,  1;
   1,  0,  0,  1;
   0,  2,  0,  0,  1;
   0,  0,  3,  0,  0,  1;
   3,  0,  0,  4,  0,  0,  1;
   0,  7,  0,  0,  5,  0,  0,  1;
   0,  0, 12,  0,  0,  6,  0,  0,  1;
  12,  0,  0, 18,  0,  0,  7,  0,  0,  1;
   0, 30,  0,  0, 25,  0,  0,  8,  0,  0,  1;
   0,  0, 55,  0,  0, 33,  0,  0,  9,  0,  0,  1;
  55,  0,  0, 88,  0,  0, 42,  0,  0, 10,  0,  0,  1;
Production matrix is
  0, 1;
  0, 0, 1;
  1, 0, 0, 1;
  0, 1, 0, 0, 1;
  0, 0, 1, 0, 0, 1;
  0, 0, 0, 1, 0, 0, 1;
  0, 0, 0, 0, 1, 0, 0, 1;
  0, 0, 0, 0, 0, 1, 0, 0, 1;
  0, 0, 0, 0, 0, 0, 1, 0, 0, 1;
		

Crossrefs

First column is A001764. Bears same relation to A001764 as A053121 does to A000108.

Programs

  • Magma
    function A111373(n,k)
      if k eq n then return 1;
      elif ((n-k) mod 3) eq 0 then return (3/(n-k))*Binomial(n, Floor((n-k-3)/3))*(k+1);
      else return 0;
      end if; return A111373;
    end function;
    [A111373(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Jul 30 2022
    
  • Mathematica
    T[n_, k_]= If[k==n, 1, If[Mod[n-k, 3]==0, (3/(n-k))*Binomial[n, (n-k)/3 -1]*(k + 1), 0]];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Jul 30 2022 *)
  • SageMath
    def A111373(n,k):
        if(k==n): return 1
        elif ((n-k)%3==0): return (3/(n-k))*binomial(n, (n-k)/3 -1)*(k+1)
        else: return 0
    flatten([[A111373(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Jul 30 2022

Formula

Each term is the sum of the two terms above it to the left and two steps to the right.
From Paul Barry, Dec 16 2006: (Start)
Riordan array (g(x^3),x*g(x^3)) where g(x)=(2/sqrt(3x))*sin(asin(sqrt(27x/4))/3), the g.f. of A001764;
Number triangle T(n,k) = C(3*floor((n+2k)/3)-2k,floor((n+2k)/3)-k)*(k+1)/(2*floor((n+2k)/3)-k+ 1)(2*cos(2*pi*(n-k)/3)+1)/3. (End)
Inverse of Riordan array (1/(1+x^3), x/(1+x^3)), A126030. - Paul Barry, Dec 16 2006
G.f. (x*A(x))^k=sum{n>=k, T(n,k)*x^n}, where A(x)=1+x^3*A(x)^3. - Vladimir Kruchinin, Feb 18 2011
From G. C. Greubel, Jul 30 2022: (Start)
T(n, k) = (3/(n-k))*binomial(n, (n-k)/3 -1)*(k+1) for ( (n-k) mod 3 ) = 0, otherwise 0, with T(n, n) = 1.
T(n, n-3) = A000027(n-2), n >= 3.
T(n, n-6) = A027379(n-5), n >= 6.
T(n, n-9) = A111396(n-8), n >= 9.
T(n, n-12) = A167543(n+5), n >= 12.
Sum_{k=0..n} T(n, k) = A126042(n). (End)

Extensions

More terms from Kerri Sullivan (ksulliva(AT)ashland.edu), Jan 23 2006

A355850 Number of monotonic lattice paths of length n which do not pass above the line y = x/(log_2(3)-1).

Original entry on oeis.org

1, 1, 2, 3, 6, 12, 22, 44, 88, 169, 338, 646, 1292, 2584, 5055, 10110, 20220, 39915, 79830, 157008, 314016, 628032, 1244631, 2489262, 4978524, 9899008, 19798016, 39596032, 78879609, 157759218, 313777086, 627554172, 1255108344, 2502016784, 5004033568, 10008067136, 19971766007
Offset: 0

Views

Author

C. Krishna, Jul 18 2022

Keywords

Comments

A monotonic lattice path is one which starts at (0,0) consists entirely of steps of length 1, moving only rightwards (x,y) -> (x+1,y) or upwards (x,y) -> (x,y+1).
a(n+1) <= 2*a(n).
Consider a stock with an initial price of x. At every time step it either gains or loses 50% of its value with equal probability (x -> 0.5*x or x-> 1.5*x). An investor buys this stock and sells it if its current price exceeds its initial price and holds onto it otherwise. What is the probability the stock is not sold after n time steps?
The answer to this is a(n) / 2^n. Limit_{n->oo} a(n) / 2^n = c ~ 0.2863153965300.
Notice that the expected value of the stock remains constant after each time step ((0.5*x + 1.5*x)/2 = x), but the expected log of the stock price is constantly decreasing, at a rate of (1/2) * log(3/4), each time step.
Using the central limit theorem, there is a 100% likelihood that the stock price falls below any arbitrarily small positive value, p > 0 in the long run.
Since there is a probability 1-c that the investment yields a profit, a probability c that the stock is never sold, and the stock maintains a constant expected value, the expected profit if sold is cx/(1-c) ~ 0.401179169535*x.

Examples

			n, a(n), list of paths
n = 0: 1 {(0,0)}
n = 1: 1 {(0,0) -> (1,0)}
n = 2: 2 {(0,0) -> (1,0) -> (2,0), (0,0) -> (1,0) -> (1,1)}
n = 3: 3 {(0,0) -> (1,0) -> (2,0) -> (3,0), (0,0) -> (1,0) -> (2,0) -> (2,1) (0,0) -> (1,0) -> (1,1) -> (2,1)}
		

Crossrefs

A367462 Expansion of (1/x) * Series_Reversion( x / (1+x+x^3/(1+x)) ).

Original entry on oeis.org

1, 1, 1, 2, 4, 7, 14, 30, 62, 131, 287, 629, 1385, 3096, 6967, 15735, 35782, 81823, 187781, 432689, 1000919, 2322584, 5405094, 12614260, 29512587, 69205602, 162634994, 382961435, 903431963, 2134945637, 5053385429, 11979405642, 28438444486, 67601886687
Offset: 0

Views

Author

Seiichi Manyama, Jan 26 2024

Keywords

Crossrefs

Cf. A126042.

Programs

  • PARI
    my(N=40, x='x+O('x^N)); Vec(serreverse(x/(1+x+x^3/(1+x)))/x)
    
  • PARI
    a(n) = sum(k=0, n\3, binomial(n+1, k)*binomial(n-2*k+1, n-3*k))/(n+1);

Formula

a(n) = (1/(n+1)) * Sum_{k=0..floor(n/3)} binomial(n+1,k) * binomial(n-2*k+1,n-3*k).

A369592 Expansion of (1/x) * Series_Reversion( x / (1+x+x^4/(1+x)^3) ).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 4, 5, 10, 16, 23, 31, 62, 102, 152, 213, 426, 712, 1084, 1556, 3112, 5255, 8116, 11843, 23686, 40288, 62866, 92842, 185684, 317548, 499376, 744277, 1488554, 2556376, 4044740, 6072124, 12144248, 20926236, 33272912, 50244660, 100489320, 173634752
Offset: 0

Views

Author

Seiichi Manyama, Jan 26 2024

Keywords

Comments

Number of ordered trees with n+1 edges, having nonroot nodes of outdegree 0 or 4. - Emanuele Munarini, Jun 20 2024

Crossrefs

Programs

  • PARI
    my(N=50, x='x+O('x^N)); Vec(serreverse(x/(1+x+x^4/(1+x)^3))/x)
    
  • PARI
    a(n) = sum(k=0, n\4, (n-4*k+1)*binomial(n+1, k))/(n+1);

Formula

a(n) = (1/(n+1)) * Sum_{k=0..floor(n/4)} (n-4*k+1) * binomial(n+1,k).
Showing 1-4 of 4 results.