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.

A136258 a(n) = 2*a(n-1) - 2*a(n-2), with a(0)=1, a(1)=5.

Original entry on oeis.org

1, 5, 8, 6, -4, -20, -32, -24, 16, 80, 128, 96, -64, -320, -512, -384, 256, 1280, 2048, 1536, -1024, -5120, -8192, -6144, 4096, 20480, 32768, 24576, -16384, -81920, -131072, -98304, 65536, 327680, 524288, 393216, -262144, -1310720, -2097152, -1572864, 1048576
Offset: 0

Views

Author

Paul Curtz, Mar 18 2008

Keywords

Comments

Sequence opposite in sign to its second differences.
Binomial transform of 1, 4, -1, -4.
A bisection gives A135520.
This sequence with offset 0 is the binomial transform of (-1)^floor(n/2)*A010685(n). - R. J. Mathar, Feb 22 2009

Crossrefs

Programs

  • Magma
    [n le 2 select 5^(n-1) else 2*(Self(n-1) - Self(n-2)): n in [1..41]]; // G. C. Greubel, Dec 02 2021
    
  • Mathematica
    LinearRecurrence[{2,-2},{1,5},50] (* Harvey P. Dale, May 21 2014 *)
  • PARI
    vector(100,n,t=if(n<3,[t1=1,5][n],-2*t1+2*t1=t)) \\ M. F. Hasler, May 01 2008
    
  • Sage
    A136258=BinaryRecurrenceSequence(2,-2,1,5)
    [A136258(n) for n in (0..40)] # G. C. Greubel, Dec 02 2021

Formula

a(4n+1) = 5*(-4)^n, a(4n+3) = 6*(-4)^n. - M. F. Hasler, May 01 2008
G.f.: x*(1+3*x)/(1-2*x+2*x^2). - R. J. Mathar, Feb 22 2009
From Paul Curtz, Apr 27 2011: (Start)
a(n)= -4 * a(n-4).
a(n)= 3*A009545(n) + A009545(n+1). (End)
E.g.f.: exp(x)*( cos(x) + 4*sin(x) ). - G. C. Greubel, Dec 02 2021

Extensions

Edited and extended by M. F. Hasler, May 01 2008
Offset corrected Paul Curtz, Apr 27 2011