A027947 a(n) = Sum_{k=m..n} T(k,n-k), where m = floor((n+1)/2); a(n) is the n-th diagonal-sum of left justified array T given by A027935.
1, 1, 2, 3, 4, 7, 9, 15, 21, 32, 48, 70, 107, 156, 236, 349, 521, 778, 1155, 1728, 2567, 3833, 5707, 8505, 12680, 18884, 28158, 41943, 62520, 93160, 138825, 206897, 308290, 459459, 684652, 1020311, 1520473, 2265815, 3376605
Offset: 0
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,2,1,-1).
Crossrefs
Cf. A027935.
Programs
-
GAP
a:=[1,1,2,3];; for n in [5..40] do a[n]:=2*a[n-2]+a[n-3]-a[n-4]; od; a; # G. C. Greubel, Sep 29 2019
-
Magma
R
:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1+x)/(1-2*x^2-x^3+x^4) )); // G. C. Greubel, Sep 29 2019 -
Maple
seq(coeff(series((1+x)/(1-2*x^2-x^3+x^4), x, n+1), x, n), n = 0..40); # G. C. Greubel, Sep 29 2019
-
Mathematica
LinearRecurrence[{0,2,1,-1}, {1,1,2,3}, 40] (* G. C. Greubel, Sep 29 2019 *)
-
PARI
my(x='x+O('x^40)); Vec((1+x)/(1-2*x^2-x^3+x^4)) \\ G. C. Greubel, Sep 29 2019
-
Sage
def A027947_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P((1+x)/(1-2*x^2-x^3+x^4)).list() A027947_list(40) # G. C. Greubel, Sep 29 2019
Formula
G.f.: (1 + x)/(1 - 2*x^2 - x^3 + x^4).
Comments