login
A274638
Main diagonal of A274637.
2
0, 0, 3, 5, 15, 27, 63, 119, 255, 495, 1023, 2015, 4095, 8127, 16383, 32639, 65535, 130815, 262143, 523775, 1048575, 2096127, 4194303, 8386559, 16777215, 33550335, 67108863, 134209535, 268435455, 536854527, 1073741823, 2147450879, 4294967295, 8589869055, 17179869183, 34359607295, 68719476735
OFFSET
0,3
FORMULA
From Colin Barker, Jul 09 2016: (Start)
a(n) = (-1+2^n+2^((n-3)/2)*(-1+(-1)^n)).
a(n) = 2^n-1 for n even.
a(n) = 2^n-1-2^((n-1)/2) for n odd.
a(n) = 3*a(n-1)-6*a(n-3)+4*a(n-4) for n>3.
G.f.: x^2*(3-4*x) / ((1-x)*(1-2*x)*(1-2*x^2)).
(End)
MATHEMATICA
LinearRecurrence[{3, 0, -6, 4}, {0, 0, 3, 5}, 50] (* Paolo Xausa, Oct 21 2024 *)
PROG
(PARI) concat([0, 0], Vec(x^2*(3-4*x)/((1-x)*(1-2*x)*(1-2*x^2)) + O(x^40))) \\ Colin Barker, Jul 09 2016
CROSSREFS
Cf. A274637.
Sequence in context: A289044 A289881 A290230 * A146244 A146457 A051044
KEYWORD
nonn,easy,changed
AUTHOR
N. J. A. Sloane, Jul 08 2016
STATUS
approved