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

A140944 Triangle T(n,k) read by rows, the k-th term of the n-th differences of the Jacobsthal sequence A001045.

Original entry on oeis.org

0, 1, 0, -1, 2, 0, 3, -2, 4, 0, -5, 6, -4, 8, 0, 11, -10, 12, -8, 16, 0, -21, 22, -20, 24, -16, 32, 0, 43, -42, 44, -40, 48, -32, 64, 0, -85, 86, -84, 88, -80, 96, -64, 128, 0, 171, -170, 172, -168, 176, -160, 192, -128, 256, 0, -341, 342, -340, 344, -336, 352, -320, 384, -256, 512, 0
Offset: 0

Views

Author

Paul Curtz, Jul 24 2008

Keywords

Comments

A variant of the triangle A140503, now including the diagonal.
Since the diagonal contains zeros, rows sums are those of A140503.

Examples

			Triangle begins as:
    0;
    1,   0;
   -1,   2,   0;
    3,  -2,   4,  0;
   -5,   6,  -4,  8,   0;
   11, -10,  12, -8,  16,  0;
  -21,  22, -20, 24, -16, 32,  0;
		

Crossrefs

Programs

  • Magma
    [2^k*(1-(-2)^(n-k))/3: k in [0..n], n in [0..15]]; // G. C. Greubel, Feb 18 2023
    
  • Maple
    A001045:= n -> (2^n-(-1)^n)/3;
    A140944:= proc(n,k) if n = 0 then A001045(k); else procname(n-1,k+1)-procname(n-1,k) ; fi; end:
    seq(seq(A140944(n,k),k=0..n),n=0..10); # R. J. Mathar, Sep 07 2009
  • Mathematica
    T[0, 0]=0; T[1, 0]= T[0, 1]= 1; T[0, k_]:= T[0, k]= T[0, k-1] + 2*T[0, k-2]; T[n_, n_]=0; T[n_, k_]:= T[n, k] = T[n-1, k+1] - T[n-1, k]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Jean-François Alcover, Dec 17 2014 *)
    Table[2^k*(1-(-2)^(n-k))/3, {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 18 2023 *)
  • PARI
    T(n, k) = (2^k - 2^n*(-1)^(n+k))/3 \\ Jianing Song, Aug 11 2022
    
  • SageMath
    def A140944(n,k): return 2^k*(1 - (-2)^(n-k))/3
    flatten([[A140944(n,k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Feb 18 2023

Formula

T(n, k) = T(n-1, k+1) - T(n-1, k). T(0, k) = A001045(k).
T(n, k) = (2^k - 2^n*(-1)^(n+k))/3, for n >= k >= 0. - Jianing Song, Aug 11 2022
From G. C. Greubel, Feb 18 2023: (Start)
T(n, n-1) = A000079(n).
T(2*n, n) = (-1)^(n+1)*A192382(n+1).
T(2*n, n-1) = (-1)^n*A246036(n-1).
T(2*n, n+1) = A083086(n).
T(3*n, n) = -A115489(n).
Sum_{k=0..n} T(n, k) = A052992(n)*[n>0] + 0*[n=0].
Sum_{k=0..n} (-1)^k*T(n, k) = A045883(n).
Sum_{k=0..n} 2^k*T(n, k) = A084175(n).
Sum_{k=0..n} (-2)^k*T(n, k) = (-1)^(n+1)*A109765(n).
Sum_{k=0..n} 3^k*T(n, k) = A091056(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = (-1)^(n+1)*A097038(n).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (-1)^(n+1)*A138495(n). (End)

Extensions

Edited and extended by R. J. Mathar, Sep 07 2009

A091054 Expansion of (1 - 5*x - 2*x^2) / ((1 - x)*(1 + 2*x)*(1 - 6*x)).

Original entry on oeis.org

1, 0, 6, 18, 138, 762, 4698, 27930, 168090, 1007514, 6047130, 36278682, 217680282, 1306065306, 7836424602, 47018482074, 282111023514, 1692665878938, 10155995797914, 60935973738906, 365615844530586, 2193695062989210
Offset: 0

Views

Author

Paul Barry, Dec 17 2003

Keywords

Comments

Closed walks of length n at a vertex of the Johnson graph J(5,2).
6^n = a(n) + 6*A091055(n) + 3*4*A091056(n).

Crossrefs

Programs

  • GAP
    List([0..30], n-> (6^n +5*(-2)^n +4)/10); # G. C. Greubel, Dec 27 2019
  • Magma
    [(6^n +5*(-2)^n +4)/10: n in [0..30]]; // G. C. Greubel, Dec 27 2019
    
  • Magma
    R:=PowerSeriesRing(Integers(), 25); Coefficients(R!( (1 - 5*x - 2*x^2) / ((1 - x)*(1 + 2*x)*(1 - 6*x)))); // Marius A. Burtea, Dec 29 2019
    
  • Maple
    seq( (6^n +5*(-2)^n +4)/10, n=0..30); # G. C. Greubel, Dec 27 2019
  • Mathematica
    Table[(6^n +5*(-2)^n +4)/10, {n,0,30}] (* G. C. Greubel, Dec 27 2019 *)
    LinearRecurrence[{5,8,-12},{1,0,6},30] (* Harvey P. Dale, Oct 21 2021 *)
  • PARI
    Vec((1 - 5*x - 2*x^2) / ((1 - x)*(1 + 2*x)*(1 - 6*x)) + O(x^25)) \\ Colin Barker, Dec 26 2019
    
  • PARI
    vector(31, n, (6^(n-1) +5*(-2)^(n-1) +4)/10) \\ G. C. Greubel, Dec 27 2019
    
  • Sage
    [(6^n +5*(-2)^n +4)/10 for n in (0..30)] # G. C. Greubel, Dec 27 2019
    

Formula

a(n) = (6^n + 5*(-2)^n + 4)/10.
a(n) = 5*a(n-1) + 8*a(n-2) - 12*a(n-3) for n>2. - Colin Barker, Dec 26 2019
E.g.f.: (exp(6*x) + 5*exp(-2*x) + 4*exp(x))/10. - G. C. Greubel, Dec 27 2019

A091055 Expansion of x*(1-2*x)/((1-x)*(1+2*x)*(1-6*x)).

Original entry on oeis.org

0, 1, 3, 23, 127, 783, 4655, 28015, 167919, 1007855, 6046447, 36280047, 217677551, 1306070767, 7836413679, 47018503919, 282110979823, 1692665966319, 10155995623151, 60935974088431, 365615843831535, 2193695064387311
Offset: 0

Views

Author

Paul Barry, Dec 17 2003

Keywords

Comments

Number of walks of length n between adjacent vertices of the Johnson graph J(5,2).
6^n = A091054(n) + 6*a(n) + 3*4*A091056(n).

Crossrefs

Programs

  • GAP
    List([0..30], n-> (3*6^n -5*(-2)^n +2)/30); # G. C. Greubel, Dec 27 2019
  • Magma
    [(3*6^n -5*(-2)^n +2)/30: n in [0..30]]; // G. C. Greubel, Dec 27 2019
    
  • Magma
    R:=PowerSeriesRing(Integers(), 25); [0] cat  Coefficients(R!( x*(1-2*x)/((1-x)*(1+2*x)*(1-6*x)))); // Marius A. Burtea, Dec 30 2019
    
  • Maple
    seq( (3*6^n -5*(-2)^n +2)/30, n=0..30); # G. C. Greubel, Dec 27 2019
  • Mathematica
    Table[(3*6^n -5*(-2)^n +2)/30, {n,0,30}] (* G. C. Greubel, Dec 27 2019 *)
  • PARI
    vector(31, n, (3*6^(n-1) -5*(-2)^(n-1) +2)/30) \\ G. C. Greubel, Dec 27 2019
    
  • Sage
    [(3*6^n -5*(-2)^n +2)/30 for n in (0..30)] # G. C. Greubel, Dec 27 2019
    

Formula

a(n) = (3*6^n - 5*(-2)^n + 2)/30.
E.g.f.: (3*exp(6*x) - 5*exp(-2*x) + 2*exp(x))/30. - G. C. Greubel, Dec 27 2019
Showing 1-3 of 3 results.