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.

A190958 a(n) = 2*a(n-1) - 10*a(n-2), with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 2, -6, -32, -4, 312, 664, -1792, -10224, -2528, 97184, 219648, -532544, -3261568, -1197696, 30220288, 72417536, -157367808, -1038910976, -504143872, 9380822016, 23803082752, -46202054656, -330434936832, -198849327104, 2906650714112, 7801794699264
Offset: 0

Views

Author

Keywords

Comments

For the difference equation a(n) = c*a(n-1) - d*a(n-2), with a(0) = 0, a(1) = 1, the solution is a(n) = d^((n-1)/2) * ChebyshevU(n-1, c/(2*sqrt(d))) and has the alternate form a(n) = ( ((c + sqrt(c^2 - 4*d))/2)^n - ((c - sqrt(c^2 - 4*d))/2)^n )/sqrt(c^2 - 4*d). In the case c^2 = 4*d then the solution is a(n) = n*d^((n-1)/2). The generating function is x/(1 - c*x + d^2) and the exponential generating function takes the form (2/sqrt(c^2 - 4*d))*exp(c*x/2)*sinh(sqrt(c^2 - 4*d)*x/2) for c^2 > 4*d, (2/sqrt(4*d - c^2))*exp(c*x/2)*sin(sqrt(4*d - c^2)*x/2) for 4*d > c^2, and x*exp(sqrt(d)*x) if c^2 = 4*d. - G. C. Greubel, Jun 10 2022

Crossrefs

Programs

  • Magma
    I:=[0,1]; [n le 2 select I[n] else 2*Self(n-1)-10*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 17 2011
    
  • Mathematica
    LinearRecurrence[{2,-10}, {0,1}, 50]
  • PARI
    a(n)=([0,1; -10,2]^n*[0;1])[1,1] \\ Charles R Greathouse IV, Apr 08 2016
    
  • SageMath
    [lucas_number1(n,2,10) for n in (0..50)] # G. C. Greubel, Jun 10 2022

Formula

G.f.: x / ( 1 - 2*x + 10*x^2 ). - R. J. Mathar, Jun 01 2011
E.g.f.: (1/3)*exp(x)*sin(3*x). - Franck Maminirina Ramaharo, Nov 13 2018
a(n) = 10^((n-1)/2) * ChebyshevU(n-1, 1/sqrt(10)). - G. C. Greubel, Jun 10 2022
a(n) = (1/3)*10^(n/2)*sin(n*arctan(3)) = Sum_{k=0..floor(n/2)} (-1)^k*3^(2*k)*binomial(n,2*k+1). - Gerry Martens, Oct 15 2022

A164975 Triangle T(n,k) read by rows: T(n,k) = T(n-1,k) + 2*T(n-1,k-1) + T(n-2,k) - T(n-2,k-1), T(n,0) = A000045(n), 0 <= k <= n-1.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 3, 8, 8, 8, 5, 15, 25, 20, 16, 8, 30, 55, 70, 48, 32, 13, 56, 125, 175, 184, 112, 64, 21, 104, 262, 440, 512, 464, 256, 128, 34, 189, 539, 1014, 1401, 1416, 1136, 576, 256, 55, 340, 1075, 2270, 3501, 4170, 3760, 2720, 1280, 512
Offset: 1

Views

Author

Mark Dols, Sep 03 2009

Keywords

Comments

A164975 is jointly generated with A209125 as an array of coefficients of polynomials v(n,x): initially, u(1,x)=v(1,x)=1; for n>1, u(n,x)=u(n-1,x)+(x+1)*v(n-1)x and v(n,x)=u(n-1,x)+ 2x*v(n-1,x). See the Mathematica section. - Clark Kimberling, Mar 05 2012

Examples

			Triangle T(n,k), 0 <= k < n, n >= 1, begins:
   1;
   1,   2;
   2,   3,   4;
   3,   8,   8,   8;
   5,  15,  25,  20,  16;
   8,  30,  55,  70,  48,  32;
  13,  56, 125, 175, 184, 112,  64;
  21, 104, 262, 440, 512, 464, 256, 128;
  ...
T(7,1) = 30 + 2*8 + 15 - 5 = 56.
T(6,1) = 15 + 2*5 +  8 - 3 = 30.
		

Crossrefs

Cf. A000045, A000079, A000244 (row sums).

Programs

  • Maple
    A164975 := proc(n,k) option remember; if n <=0 or k > n or k< 1 then 0; elif k= 1 then combinat[fibonacci](n); else procname(n-1,k)+2*procname(n-1,k-1)+procname(n-2,k)-procname(n-2,k-1) ; end if; end proc: # R. J. Mathar, Jan 27 2011
  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + (x + 1)*v[n - 1, x];
    v[n_, x_] := u[n - 1, x] + 2 x*v[n - 1, x];
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A209125 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A164975 *)
    (* Clark Kimberling, Mar 05 2012 *)
    With[{nmax = 10}, Rest[CoefficientList[CoefficientList[Series[ x/(1 - 2*y*x-x-x^2+y*x^2), {x,0,nmax}, {y,0,nmax}], x], y]]//Flatten] (* G. C. Greubel, Jan 14 2018 *)

Formula

T(n,n-1) = A000079(n-1).
T(n,n-2) = A001792(n-2). - R. J. Mathar, Jan 27 2011
T(n,1) = A099920(n-1). - R. J. Mathar, Jan 27 2011
G.f.: x/(1-2*y*x-x-x^2+y*x^2). - Philippe Deléham, Mar 21 2012
Sum_{k=0..n-1, n>0} T(n,k)*x^k = A000045(n), A000244(n-1), A004254(n), A186446(n-1), A190980(n) for x = 0, 1, 2, 3, 4 respectively. - Philippe Deléham, Mar 21 2012

Extensions

Corrected by Philippe Deléham, Mar 21 2012

A268344 a(n) = 11*a(n - 1) - 3*a(n - 2) for n>1, a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 11, 118, 1265, 13561, 145376, 1558453, 16706855, 179100046, 1919979941, 20582479213, 220647331520, 2365373209081, 25357163305331, 271832676731398, 2914087954129385, 31239469465229041, 334891900255131296, 3590092494410757133
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 02 2016

Keywords

Comments

In general, the ordinary generating function for the recurrence relation b(n) = k*b(n - 1) - m*b(n - 2), with n>1 and b(0)=0, b(1)=1, is x/(1 - k*x + m*x^2). This recurrence gives the closed form b(n) = (2^(-n)*((sqrt(k^2 - 4*m) + k)^n - (k - sqrt(k^2 - 4*m))^n))/sqrt(k^2 - 4*m).

Crossrefs

Programs

  • Magma
    I:=[0,1]; [n le 2 select I[n] else 11*Self(n-1) - 3*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 14 2018
  • Mathematica
    LinearRecurrence[{11, -3}, {0, 1}, 20] (* or *) Table[(((11 + Sqrt[109])/2)^n - ((11 - Sqrt[109])/2)^n)/Sqrt[109], {n, 0, 20}]
  • PARI
    x='x+O('x^30); concat([0], Vec(x/(1-11*x+3*x^2))) \\ G. C. Greubel, Jan 14 2018
    

Formula

G.f.: x/(1 - 11*x + 3*x^2).
a(n) = ( ((11 + sqrt(109))/2)^n - ((11 - sqrt(109))/2)^n )/sqrt(109).
Showing 1-3 of 3 results.