A140164 Binomial transform of [1, 1, 1, 1, -1, -1, 5, -11, 19, -29, 41, ...].
1, 2, 4, 8, 14, 20, 26, 32, 38, 44, 50, 56, 62, 68, 74, 80, 86, 92, 98, 104, 110, 116, 122, 128, 134, 140, 146, 152, 158, 164, 170, 176, 182, 188, 194, 200, 206, 212, 218, 224, 230, 236, 242, 248, 254, 260, 266, 272, 278, 284, 290, 296, 302, 308, 314, 320, 326
Offset: 1
Examples
a(4) = 8 = (1, 3, 3, 1) dot (1, 1, 1, 1) = (1 + 3 + 3 + 1). a(5) = 14 = (4 + 5 + 4 + 1).
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (2,-1).
Crossrefs
Cf. A028387.
Programs
-
GAP
Concatenation([1,2,4], List([4..60], n-> 6*n-16)); # G. C. Greubel, May 12 2019
-
Magma
R
:=PowerSeriesRing(Integers(), 60); Coefficients(R!( x*(1+x^2+2*x^3+2*x^4)/(1-x)^2 )); // G. C. Greubel, May 12 2019 -
Maple
From R. J. Mathar, May 03 2010: (Start) A028387 := proc(n) option remember; if n <= 2 then op(n+1,[1,5,11]) ; else 3*procname(n-1)-3*procname(n-2)+procname(n-3) ; end if; end proc: read("transforms") ; L := [1,1,1,1,-1, seq((-1)^(n+1)*A028387(n), n=0..60)]; BINOMIAL(L) ; (End)
-
Mathematica
Table[If[n < 4, 2^(n - 1), 6 n - 16], {n, 60}] (* or *) Rest@CoefficientList[Series[x*(1+x^2+2x^3+2x^4)/(1-x)^2, {x, 0, 60}], x] (* Michael De Vlieger, Jul 18 2016 *)
-
PARI
a(n)=if(n<4,2^(n-1),6*n-16) \\ Charles R Greathouse IV, Jul 17 2016
-
Sage
(x*(1+x^2+2*x^3+2*x^4)/(1-x)^2).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, May 12 2019
Formula
Binomial transform of [1, 1, 1, 1, -1, -1, 5, -11, 19, -29, 41, -55,...]; where A028387 = (1, 5, 11, 19, 29, 41,...), such that A028387(n) = (2*T(n) - 1).
From R. J. Mathar, May 03 2010: (Start)
G.f.: x*(1+x^2+2*x^3+2*x^4)/(1-x)^2. [G.f. amended by Georg Fischer, May 12 2019]
a(n) = A016933(n-2), n>2. (End)
a(n) = 2*(3n-5), n >= 3, if offset is 0 instead of 1. - Daniel Forgues, Jul 17 2016
Extensions
More terms from R. J. Mathar, May 03 2010
Comments