OFFSET
0,2
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
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-2).
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).
E.g.f.: exp(x)*( cos(x) + 4*sin(x) ). - G. C. Greubel, Dec 02 2021
MATHEMATICA
LinearRecurrence[{2, -2}, {1, 5}, 50] (* Harvey P. Dale, May 21 2014 *)
PROG
(PARI) vector(100, n, t=if(n<3, [t1=1, 5][n], -2*t1+2*t1=t)) \\ M. F. Hasler, May 01 2008
(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
(Sage)
A136258=BinaryRecurrenceSequence(2, -2, 1, 5)
[A136258(n) for n in (0..40)] # G. C. Greubel, Dec 02 2021
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Mar 18 2008
EXTENSIONS
Edited and extended by M. F. Hasler, May 01 2008
Offset corrected Paul Curtz, Apr 27 2011
STATUS
approved