login
a(0)=1; thereafter a(n) = 9*n - 3.
5

%I #49 Mar 07 2023 18:50:45

%S 1,6,15,24,33,42,51,60,69,78,87,96,105,114,123,132,141,150,159,168,

%T 177,186,195,204,213,222,231,240,249,258,267,276,285,294,303,312,321,

%U 330,339,348,357,366,375,384,393,402,411,420,429,438,447,456,465,474,483

%N a(0)=1; thereafter a(n) = 9*n - 3.

%C Self-convolution of A122553.

%H Colin Barker, <a href="/A122709/b122709.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1).

%F a(0)=1, a(n) = 9*n - 3 = A008591(n) - 3 for n > 0.

%F a(n) = 2*a(n-1) - a(n-2) for n > 2; a(0)=1, a(1)=6, a(2)=15.

%F a(n) = a(n-1) + 9 for n > 1; a(0)=1, a(1)=6.

%F G.f.: ((1 + 2*x)/(1 - x))^2.

%F Equals binomial transform of [1, 5, 4, -4, 4, -4, 4, ...]. - _Gary W. Adamson_, Dec 10 2007

%F a(n) = A017233(n-1) for n > 0. - _Georg Fischer_, Oct 21 2018

%F E.g.f.: exp(x)*(9*x - 3) + 4. - _Stefano Spezia_, Mar 07 2023

%p seq(coeff(series(((1+2*x)/(1-x))^2,x,n+1), x, n), n = 0 .. 60); # _Muniru A Asiru_, Oct 21 2018

%t Join[{1},LinearRecurrence[{2,-1},{6,15},60]] (* _Harvey P. Dale_, Jun 12 2012 *)

%o (PARI) a(n)=max(9*n-3,1) \\ _Charles R Greathouse IV_, Jan 17 2012

%o (PARI) Vec((1 + 2*x)^2 / (1 - x)^2 + O(x^100)) \\ _Colin Barker_, Jan 22 2018

%o (GAP) a:=[6,15];; for n in [3..60] do a[n]:=2*a[n-1]-a[n-2]; od; Concatenation([1],a); # _Muniru A Asiru_, Oct 21 2018

%Y Cf. A017233 (9n+6), A008591, A122553.

%K nonn,easy

%O 0,2

%A _Philippe Deléham_, Sep 23 2006

%E Edited by _N. J. A. Sloane_, Jan 23 2018