Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A112689
A modified Chebyshev transform of the Jacobsthal numbers.
5
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, 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, 11, 12, 11, 11, 12, 12, 12, 12, 12, 13, 13, 12, 13, 14, 13, 13, 14, 14, 14, 14, 14, 15, 15, 14
OFFSET
0,6
FORMULA
G.f.: x/((1+x^2)*(1+x+x^2)*(1-x)^2).
a(n) = sum{k=0..floor((n+2)/2), (-1)^(k+1)*C(n-k+2, k-1)*A001045(n-2k+2)}.
a(n) = floor((n+4)/6+(1-(-1)^n)*(-1)^floor(n/2)/4). - Tani Akinari, Aug 13 2013
G.f.: x / (1 - x + x^2 - 2*x^3 + x^4 - x^5 + x^6). - Michael Somos, Dec 11 2013
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
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
Euler transform of length 4 sequence [ 1, -1, 1, 1]. - Michael Somos, Dec 17 2013
EXAMPLE
G.f. = x + x^2 + x^4 + 2*x^5 + x^6 + x^7 + 2*x^8 + 2*x^9 + 2*x^10 + ...
MATHEMATICA
CoefficientList[Series[x / ((1 + x^2) (1 + x + x^2) (1 - x)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Aug 14 2013 *)
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 *)
LinearRecurrence[{1, -1, 2, -1, 1, -1}, {0, 1, 1, 0, 1, 2}, 100] (* Harvey P. Dale, Apr 18 2022 *)
PROG
(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
(PARI) a(n) = floor((n+4)/6+(1-(-1)^n)*(-1)^floor(n/2)/4); \\ Joerg Arndt, Aug 14 2013
(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 */
CROSSREFS
Cf. A051275.
Sequence in context: A053261 A123584 A291983 * A298604 A190353 A331904
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Sep 15 2005
STATUS
approved