login
Squares and centered square numbers interleaved.
2

%I #16 Sep 07 2015 05:15:24

%S 0,1,1,5,4,13,9,25,16,41,25,61,36,85,49,113,64,145,81,181,100,221,121,

%T 265,144,313,169,365,196,421,225,481,256,545,289,613,324,685,361,761,

%U 400,841,441,925,484,1013,529,1105,576,1201,625,1301,676,1405,729,1513

%N Squares and centered square numbers interleaved.

%C This could be called the inverse Motzkin transform of A109188 since the substitution x -> x/(1+x+x^2) in the independent variable of the g.f. A109188(x) yields this sequence here.

%H Vincenzo Librandi, <a href="/A147685/b147685.txt">Table of n, a(n) for n = 0..1000</a>

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

%F a(2*n) = A000290(n), a(2*n+1) = A001844(n).

%F O.g.f.: x*(1+x+x^2)*(1+x^2)/((1-x)^3*(1+x)^3).

%F a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6), n>5.

%F Euler transform of length 4 sequence [ 1, 4, -1, -1]. - _Michael Somos_, Aug 07 2014

%F a(2n+1) = a(2n) + a(2n+2) for all n in Z. - _Michael Somos_, Aug 07 2014

%F A120328(n-1) = 3*n^2 + 2 = a(2*n + 1) - a(2*n)+ a(2*n - 1) for all n in Z. - _Michael Somos_, Aug 07 2014

%F a(n) = n^2*(1+(-1)^n)/8+(n^2+1)*(1-(-1)^n)/4. - _Wesley Ivan Hurt_, Sep 06 2015

%e G.f. = x + x^2 + 5*x^3 + 4*x^4 + 13*x^5 + 9*x^6 + 25*x^7 + 16*x^8 + 41*x^9 + ...

%p A147685:=n->n^2*(1+(-1)^n)/8+(n^2+1)*(1-(-1)^n)/4: seq(A147685(n), n=0..70); # _Wesley Ivan Hurt_, Sep 06 2015

%t CoefficientList[Series[x (1 + x + x^2) (1 + x^2)/((1 - x)^3 (1 + x)^3), {x, 0, 50}], x] (* _Vincenzo Librandi_, Aug 07 2014 *)

%o (PARI) {a(n) = if( n%2, (n^2 + 1) / 2, n^2 / 4)}; /* _Michael Somos_, Aug 07 2014 */

%Y Cf. A000290, A001844, A109188, A120328.

%K easy,nonn

%O 0,4

%A _R. J. Mathar_, Nov 10 2008