login
A modified Chebyshev transform of the Jacobsthal numbers.
5

%I #27 Sep 08 2022 08:45:23

%S 0,1,1,0,1,2,1,1,2,2,2,2,2,3,3,2,3,4,3,3,4,4,4,4,4,5,5,4,5,6,5,5,6,6,

%T 6,6,6,7,7,6,7,8,7,7,8,8,8,8,8,9,9,8,9,10,9,9,10,10,10,10,10,11,11,10,

%U 11,12,11,11,12,12,12,12,12,13,13,12,13,14,13,13,14,14,14,14,14,15,15,14

%N A modified Chebyshev transform of the Jacobsthal numbers.

%H Vincenzo Librandi, <a href="/A112689/b112689.txt">Table of n, a(n) for n = 0..10000</a>

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

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

%F a(n) = sum{k=0..floor((n+2)/2), (-1)^(k+1)*C(n-k+2, k-1)*A001045(n-2k+2)}.

%F a(n) = floor((n+4)/6+(1-(-1)^n)*(-1)^floor(n/2)/4). - _Tani Akinari_, Aug 13 2013

%F G.f.: x / (1 - x + x^2 - 2*x^3 + x^4 - x^5 + x^6). - _Michael Somos_, Dec 11 2013

%F a(-4 - n) = -a(n). a(2*n) = floor( (n+2) / 3). a(2*n + 1) = A051275(n). a(6*n) = a(6*n - 2) = a(6*n - 4) = n. a(6*n + 1) - 1 = a(6*n - 3) = a(6*n - 7) = 2 * floor(n/2). - _Michael Somos_, Dec 11 2013

%F 0 = a(n) - a(n-1) + a(n-2) - 2*a(n-3) + a(n-4) - a(n-5) + a(n-6) for all n in Z. - _Michael Somos_, Dec 11 2013

%F Euler transform of length 4 sequence [ 1, -1, 1, 1]. - _Michael Somos_, Dec 17 2013

%e G.f. = x + x^2 + x^4 + 2*x^5 + x^6 + x^7 + 2*x^8 + 2*x^9 + 2*x^10 + ...

%t CoefficientList[Series[x / ((1 + x^2) (1 + x + x^2) (1 - x)^2), {x, 0, 100}], x] (* _Vincenzo Librandi_, Aug 14 2013 *)

%t a[ n_] := If[n > 0, SeriesCoefficient[ x / (1 - x + x^2 - 2 x^3 + x^4 - x^5 + x^6), {x, 0, n}], SeriesCoefficient[ -x^5 / (1 - x + x^2 - 2 x^3 + x^4 - x^5 + x^6), {x, 0, -n}]] (* _Michael Somos_, Dec 17 2013 *)

%t LinearRecurrence[{1,-1,2,-1,1,-1},{0,1,1,0,1,2},100] (* _Harvey P. Dale_, Apr 18 2022 *)

%o (Magma) I:=[0, 1, 1, 0, 1, 2]; [n le 6 select I[n] else Self(n-1)-Self(n-2)+2*Self(n-3)-Self(n-4)+Self(n-5)-Self(n-6): n in [1..100]]; // _Vincenzo Librandi_, Aug 14 2013

%o (PARI) a(n) = floor((n+4)/6+(1-(-1)^n)*(-1)^floor(n/2)/4); \\ _Joerg Arndt_, Aug 14 2013

%o (PARI) {a(n) = if( n>0, polcoeff( x / (1 - x + x^2 - 2*x^3 + x^4 - x^5 + x^6) + x * O(x^n), n), polcoeff( -x^5 / (1 - x + x^2 - 2*x^3 + x^4 - x^5 + x^6) + x * O(x^-n), -n))} /* _Michael Somos_, Dec 11 2013 */

%Y Cf. A051275.

%K easy,nonn

%O 0,6

%A _Paul Barry_, Sep 15 2005