login
A122958
a(0)=1, a(n) = 2 - 2^(n-1) for n>0.
4
1, 1, 0, -2, -6, -14, -30, -62, -126, -254, -510, -1022, -2046, -4094, -8190, -16382, -32766, -65534, -131070, -262142, -524286, -1048574, -2097150, -4194302, -8388606, -16777214, -33554430, -67108862, -134217726, -268435454, -536870910, -1073741822, -2147483646
OFFSET
0,4
COMMENTS
Take square of A014217 (1,1,2,4,6) and successive differences: a(n) is principal diagonal (k-th term of k-th row). a(n) differences: 0, -1, -2, -4, -8, -16, ... = -A131577. - Paul Curtz, Sep 26 2008
LINKS
Yasemin Alp and E. Gokcen Kocer, Exponential Almost-Riordan Arrays, Results Math. (2024) Vol. 79, 173.
FORMULA
a(0) = 1, a(1) = 1, a(2) = 0, a(n) = 3*a(n-1) - 2*a(n-2) for n>2.
G.f.: (1 - 2*x - x^2)/(1 - 3*x + 2*x^2).
a(n) = -A000918(n-1) for n>0.
a(n+1) = 2*a(n) - 2 for n>0. - Michael Somos, Feb 08 2015
E.g.f.: exp(x)*(2 - cosh(x)). - Stefano Spezia, May 07 2023
EXAMPLE
G.f. = 1 + x - 2*x^3 - 6*x^4 - 14*x^5 - 30*x^6 - 62*x^7 - 126*x^8 - 254*x^9 + ...
MATHEMATICA
Join[{1}, LinearRecurrence[{3, -2}, {1, 0}, 50]] (* Vladimir Joseph Stephan Orlovsky, Feb 24 2012 *)
Join[{1}, 2-2^#&/@Range[0, 30]] (* Harvey P. Dale, Jan 19 2021 *)
PROG
(PARI) {a(n) = if( n<1, n==0, 2 - 2^(n-1))}; /* Michael Somos, Feb 08 2015 */
CROSSREFS
Apart from signs, same as A000918.
Cf. A131577.
Sequence in context: A331699 A327048 A228038 * A122959 A095121 A296965
KEYWORD
sign,easy
AUTHOR
Philippe Deléham, Oct 26 2006
EXTENSIONS
Corrected a(22) by Vincenzo Librandi, Aug 11 2011
STATUS
approved