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.

Previous Showing 21-24 of 24 results.

A026584 Irregular triangular array T read by rows: T(i,0) = T(i,2i) = 1 for i >= 0; T(i,1) = T(i,2i-1) = floor(i/2) for i >= 1; and for i >= 2 and j = 2..2i-2, T(i,j) = T(i-1,j-2) + T(i-1,j-1) + T(i-1,j) if i+j is odd, and T(i,j) = T(i-1,j-2) + T(i-1,j) if i+j is even.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 1, 4, 2, 4, 1, 1, 1, 2, 5, 7, 8, 7, 5, 2, 1, 1, 2, 8, 9, 20, 14, 20, 9, 8, 2, 1, 1, 3, 9, 19, 28, 43, 40, 43, 28, 19, 9, 3, 1, 1, 3, 13, 22, 56, 62, 111, 86, 111, 62, 56, 22, 13, 3, 1, 1, 4, 14, 38, 69, 140, 167, 259, 222, 259, 167, 140, 69, 38, 14, 4, 1
Offset: 1

Views

Author

Keywords

Comments

Row sums are in A026597. - Philippe Deléham, Oct 16 2006
T(n, k) = number of integer strings s(0)..s(n) such that s(0) = 0, s(n) = n-k, |s(i)-s(i-1)| <= 1 if s(i-1) odd, |s(i)-s(i-1)| = 1 if s(i-1) is even, for i = 1..n.

Examples

			First 5 rows:
  1
  1  0  1
  1  1  2  1  1
  1  1  4  2  4  1  1
  1  2  5  7  8  7  5  2  1
		

Crossrefs

Programs

  • Mathematica
    z = 12; t[n_, 0] := 1; t[n_, k_] := 1 /; k == 2 n; t[n_, 1] := Floor[n/2]; t[n_, k_] := Floor[n/2] /; k == 2 n - 1; t[n_, k_] := t[n, k] = If[EvenQ[n + k], t[n - 1, k - 2] + t[n - 1, k], t[n - 1, k - 2] + t[n - 1, k - 1] + t[n - 1, k]]; u = Table[t[n, k], {n, 0, z}, {k, 0, 2 n}];
    TableForm[u]   (* A026584 array *)
    v = Flatten[u] (* A026584 sequence *)
  • Sage
    @CachedFunction
    def T(n,k):
        if (k==0 or k==2*n): return 1
        elif (k==1 or k==2*n-1): return (n//2)
        else: return T(n-1, k-2) + T(n-1, k) if ((n+k)%2==0) else T(n-1, k-2) + T(n-1, k-1) + T(n-1, k)
    flatten([[T(n,k) for k in (0..2*n)] for n in (0..12)]) # G. C. Greubel, Dec 11 2021

Formula

T(n, k) = T(n-1, k-2) + T(n-1, k) if ( (n+k) mod 2 ) = 0, otherwise T(n-1, k-2) + T(n-1, k-1) + T(n-1, k), where T(n, 0) = T(n, 2*n) = 1, T(n, 1) = T(n, 2*n-1) = floor(n/2).

Extensions

Updated by Clark Kimberling, Aug 29 2014

A026581 Expansion of (1 + 2*x) / (1 - x - 4*x^2).

Original entry on oeis.org

1, 3, 7, 19, 47, 123, 311, 803, 2047, 5259, 13447, 34483, 88271, 226203, 579287, 1484099, 3801247, 9737643, 24942631, 63893203, 163663727, 419236539, 1073891447, 2750837603, 7046403391, 18049753803, 46235367367, 118434382579, 303375852047, 777113382363
Offset: 0

Views

Author

Keywords

Comments

T(n,0) + T(n,1) + ... + T(n,2n), T given by A026568.
Row sums of Riordan array ((1+2x)/(1+x),x(1+2x)/(1+x)). Binomial transform is A055099. - Paul Barry, Jun 26 2008
Equals row sums of triangle A153341. - Gary W. Adamson, Dec 24 2008
Also, the number of walks of length n starting at vertex 0 in the graph with 4 vertices and edges {{0,1}, {0,2}, {0,3}, {1,2}, {2,3}}. - Sean A. Irvine, Jun 02 2025

Crossrefs

Programs

  • GAP
    a:=[1,3];; for n in [3..30] do a[n]:=a[n-1]+4*a[n-2]; od; a; # G. C. Greubel, Aug 03 2019
  • Magma
    I:=[1,3]; [n le 2 select I[n] else Self(n-1) +4*Self(n-2): n in [1..30]]; // G. C. Greubel, Aug 03 2019
    
  • Mathematica
    CoefficientList[Series[(1+2x)/(1-x-4x^2),{x,0,30}],x] (* or *) LinearRecurrence[{1,4},{1,3},30] (* Harvey P. Dale, Aug 04 2015 *)
  • PARI
    Vec((1+2*x)/(1-x-4*x^2) + O(x^30)) \\ Colin Barker, Dec 22 2016
    
  • Sage
    ((1+2*x)/(1-x-4*x^2)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Aug 03 2019
    

Formula

G.f.: (1 + 2*x) / (1 - x - 4*x^2).
a(n) = a(n-1) + 4*a(n-2), n>1.
a(n) = 2*A006131(n-1) + A006131(n), n>0.
a(n) = (2^(-1-n)*((1-sqrt(17))^n*(-5+sqrt(17)) + (1+sqrt(17))^n*(5+sqrt(17))))/sqrt(17). - Colin Barker, Dec 22 2016

Extensions

Edited by Ralf Stephan, Jul 20 2013

A027277 a(n) = Sum_{k=0..n} binomial(2*k,k)*binomial(2*n-k,k).

Original entry on oeis.org

1, 3, 13, 67, 375, 2189, 13089, 79479, 487833, 3018355, 18792303, 117589689, 738844719, 4658460165, 29458662005, 186761788579, 1186655988771, 7554520173441, 48176764031385, 307706150625855, 1968040844127793, 12602972755261195, 80798365998084795, 518536437750443773
Offset: 0

Views

Author

Keywords

Comments

Previous name was: a(n) = self-convolution of row n of array T given by A026568.

Crossrefs

Cf. A026568.

Programs

  • GAP
    B:=Binomial;; List([0..30], n-> Sum([0..n], k-> B(2*k,k)*B(2*n-k,k) )); # G. C. Greubel, Aug 03 2019
  • Magma
    B:=Binomial; [(&+[B(2*k,k)*B(2*n-k,k): k in [0..n]]): n in [0..30]]; // G. C. Greubel, Aug 03 2019
    
  • Maple
    a := n -> add(binomial(2*k,k)*binomial(2*n-k,k), k=0..n):
    seq(a(n),n=0..23); # Peter Luschny, May 14 2016
  • Mathematica
    Table[Sum[Binomial[2k, k] Binomial[2n-k, k], {k,0,n}], {n,0,30}] (* Michael De Vlieger, May 14 2016 *)
  • PARI
    vector(30, n, n--; b=binomial; sum(k=0,n, b(2*k,k)*b(2*n-k,k)) ) \\ G. C. Greubel, May 23 2017, modified Aug 03 2019
    
  • Sage
    b=binomial; [sum(b(2*k,k)*b(2*n-k,k) for k in (0..n)) for n in (0..30)] # G. C. Greubel, Aug 03 2019
    

Formula

From Peter Luschny, May 14 2016: (Start)
a(n) = hypergeom([1/2, -n, 1/2-n], [1, -2*n], -16) for n>=1.
a(n) = (2*n*(4*n-5)*(-9+4*n)*(-7+4*n)*a(n-3) - (4*n-5)*(50*n^3-175*n^2+152*n-9)* a(n-2) + (80*n^3-260*n^2+198*n-27)*(n-1)*a(n-1)) / (n*(n-1)*(-9+4*n)*(-1+2*n)) for n>=3. (End)
a(n) ~ sqrt(5 + 13/sqrt(17)) * ((9 + sqrt(17))/2)^n / (4*sqrt(Pi*n)). - Vaclav Kotesovec, May 14 2016

Extensions

New name from Peter Luschny, May 14 2016

A103279 Array read by antidiagonals, generated by the matrix M = [1,1,1;1,N,1;1,1,1].

Original entry on oeis.org

1, 1, 3, 1, 3, 8, 1, 3, 9, 22, 1, 3, 10, 27, 60, 1, 3, 11, 34, 81, 164, 1, 3, 12, 43, 116, 243, 448, 1, 3, 13, 54, 171, 396, 729, 1224, 1, 3, 14, 67, 252, 683, 1352, 2187, 3344, 1, 3, 15, 82, 365, 1188, 2731, 4616, 6561, 9136, 1, 3, 16, 99, 516, 2019, 5616, 10923, 15760
Offset: 0

Views

Author

Lambert Klasen (lambert.klasen(AT)gmx.net), Jan 27 2005

Keywords

Comments

Consider the matrix M = [1,1,1;1,N,1;1,1,1]; Characteristic polynomial of M is x^3 + (-N - 2)*x^2 + (2*N - 2)*x.
Now (M^n)[1,1] is equivalent to the recursion a(1) = 1, a(2) = 3, a(n) = (N+2)a(n-1)+(2N-2)a(n-2). (This also holds for negative N and fractional N.)
a(n+1)/a(n) converges to the upper root of the characteristic polynomial ((N + 2) + sqrt((N - 2)^2 + 8))/2 for n to infinity.
Columns of array follow the polynomials:
1,
3,
N + 8,
N^2 + 4*N + 22,
N^3 + 4*N^2 + 16*N + 60,
N^4 + 4*N^3 + 18*N^2 + 56*N + 164,
N^5 + 4*N^4 + 20*N^3 + 68*N^2 + 188*N + 448,
N^6 + 4*N^5 + 22*N^4 + 80*N^3 + 248*N^2 + 608*N + 1224,
N^7 + 4*N^6 + 24*N^5 + 92*N^4 + 312*N^3 + 864*N^2 + 1920*N + 3344,
N^8 + 4*N^7 + 26*N^6 + 104*N^5 + 380*N^4 + 1152*N^3 + 2928*N^2 + 5952*N + 9136,
etc.

Examples

			Array begins:
1,3,8,22,60,164,448,1224,3344,9136,...
1,3,9,27,81,243,729,2187,6561,19683,...
1,3,10,34,116,396,1352,4616,15760,53808,...
1,3,11,43,171,683,2731,10923,43691,174763,...
1,3,12,54,252,1188,5616,26568,125712,594864,...
...
		

Crossrefs

Cf. A103280 (for (M^n)[1, 2]), A028859 (for N=0), A000244 (for N=1), A007052 (for N=2), A007583 (for N=3), A083881 (for N=4), A026581 (for N=-1), A026532 (for N=-2), A026568.

Programs

  • PARI
    T11(N, n) = if(n==1,1,if(n==2,3,(N+2)*r1(N,n-1)-(2*N-2)*r1(N,n-2))) for(k=0,10,print1(k,": ");for(i=1,10,print1(T11(k,i),","));print())

Formula

T(N, 1)=1, T(N, 2)=3, T(N, n)=(N+2)*T(N, n-1)-(2*N-2)*T(N, n-2).
Previous Showing 21-24 of 24 results.