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.

A161938 a(n) = ((3+sqrt(2))*(2+sqrt(2))^n + (3-sqrt(2))*(2-sqrt(2))^n)/2.

Original entry on oeis.org

3, 8, 26, 88, 300, 1024, 3496, 11936, 40752, 139136, 475040, 1621888, 5537472, 18906112, 64549504, 220385792, 752444160, 2569005056, 8771131904, 29946517504, 102243806208, 349082189824, 1191841146880, 4069200207872, 13893118537728, 47434073735168
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), Jun 22 2009, Jun 29 2009

Keywords

Comments

Second binomial transform of A162255.

Crossrefs

Programs

  • GAP
    a:=[3,8];; for n in [3..25] do a[n]:=4*a[n-1]-2*a[n-2]; od; a; # Muniru A Asiru, Sep 28 2018
  • Magma
    Z:=PolynomialRing(Integers()); N:=NumberField(x^2-2); S:=[ ((3+r)*(2+r)^n+(3-r)*(2-r)^n)/2: n in [0..23] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 01 2009
    
  • Magma
    I:=[3,8]; [n le 2 select I[n] else 4*Self(n-1) - 2*Self(n-2): n in [1..30]]; // G. C. Greubel, Sep 28 2018
    
  • Maple
    seq(coeff(series((3-4*x)/(1-4*x+2*x^2),x,n+1), x, n), n = 0..25); # Muniru A Asiru, Sep 28 2018
  • Mathematica
    CoefficientList[Series[(3-4*x)/(1-4*x+2*x^2), {x,0,50}], x] (* G. C. Greubel, Sep 28 2018 *)
  • PARI
    my(x='x+O('x^50)); Vec((3-4*x)/(1-4*x+2*x^2)) \\ G. C. Greubel, Sep 28 2018
    

Formula

a(n) = 4*a(n-1) - 2*a(n-2) for n>1; a(0) = 3; a(1) = 8.
G.f.: (3-4*x)/(1-4*x+2*x^2).
From G. C. Greubel, Sep 28 2018: (Start)
a(2*n) = 2^(n-1) * (Q(2*n +1) + 2*Q(2*n)), Q(m) = Pell-Lucas numbers = A002203(m).
a(2*n+1) = 2^(n-1) * (P(2*n+2) + 2*P(2*n+1)), P(m) = Pell numbers = A000129(m). (End)

Extensions

Edited and extended beyond a(5) by Klaus Brockhaus, Jul 01 2009