A287479 Expansion of g.f. (x + x^2)/(1 + 3*x^2).
0, 1, 1, -3, -3, 9, 9, -27, -27, 81, 81, -243, -243, 729, 729, -2187, -2187, 6561, 6561, -19683, -19683, 59049, 59049, -177147, -177147, 531441, 531441, -1594323, -1594323, 4782969, 4782969, -14348907, -14348907, 43046721, 43046721, -129140163, -129140163, 387420489
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0, -3).
Crossrefs
Programs
-
Mathematica
Join[{0}, LinearRecurrence[{0, -3}, {1, 1}, 40]] (* or, computation from b = A157241 : *) b[n_] := (Switch[Mod[n, 3], 0, (-1)^((n + 3)/3), 1, (-1)^((n + 5)/3), 2, (-1)^((n + 4)/3)*2]*2^n + 1)/3; tb = Table[b[n], {n, 0, 40}]; Table[ Differences[tb, n], {n, 0, 40}][[All, 1]]
-
PARI
concat([0], Vec((x + x^2)/(1 + 3*x^2) + O(x^40))) \\ Felix Fröhlich, Oct 23 2018
Formula
a(n) = -3*a(n-2) for n > 2.
E.g.f.: (1 - cos(sqrt(3)*x) + sqrt(3)*sin(sqrt(3)*x))/3. - Stefano Spezia, Jul 15 2024
Comments