login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A358027
Expansion of g.f.: (1 + x - 2*x^2 + 2*x^4)/((1-x)*(1-3*x^2)).
1
1, 2, 3, 6, 11, 20, 35, 62, 107, 188, 323, 566, 971, 1700, 2915, 5102, 8747, 15308, 26243, 45926, 78731, 137780, 236195, 413342, 708587, 1240028, 2125763, 3720086, 6377291, 11160260, 19131875, 33480782, 57395627
OFFSET
0,2
FORMULA
a(n) = (1/3)*(2*[n=0] + 2*[n=1] - 3 + 4*A254006(n) + 7*A254006(n-1))).
a(n) = a(n-1) - 3*a(n-2) + 3*a(n-3), for n >= 5.
E.g.f.: (1/3)*( 2 + 2*x - 3*exp(x) + 4*cosh(sqrt(3)*x) + (7/sqrt(3))*sinh(sqrt(3)*x) ).
G.f.: (1 +x -2*x^2 +2*x^4)/((1-x)*(1-3*x^2)). - Clark Kimberling, Oct 31 2022
MATHEMATICA
LinearRecurrence[{1, 3, -3}, {1, 2, 3, 6, 11}, 61]
PROG
(Magma) I:=[3, 6, 11]; [1, 2] cat [n le 3 select I[n] else Self(n-1) +3*Self(n-2) -3*Self(n-3): n in [1..60]];
(SageMath)
def A254006(n): return 3^(n/2)*(1 + (-1)^n)/2
def A358027(n): return (1/3)*( 4*A254006(n) + 7*A254006(n-1) +2*int(n==0) + 2*int(n==1) - 3 )
[A358027(n) for n in (0..60)]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
G. C. Greubel, Oct 31 2022
STATUS
approved