|
|
A262672
|
|
Expansion of (3-x-x^3) / ((x-1)^2*(1+x+x^2+x^3)).
|
|
1
|
|
|
3, 2, 2, 1, 4, 3, 3, 2, 5, 4, 4, 3, 6, 5, 5, 4, 7, 6, 6, 5, 8, 7, 7, 6, 9, 8, 8, 7, 10, 9, 9, 8, 11, 10, 10, 9, 12, 11, 11, 10, 13, 12, 12, 11, 14, 13, 13, 12, 15, 14, 14, 13, 16, 15, 15, 14, 17, 16, 16, 15, 18, 17, 17, 16, 19, 18, 18, 17, 20, 19, 19, 18, 21
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Sequence can be defined as a composition of arithmetic sequences and it can be generated by the equations: a(4k) = k+3, a(4k+3) = k+1, a(4k+1) = a(4k+2) = k+2, with k >= 0.
Obviously, minimum value of sequence is a(3), which is also unique value that has no repetition in sequence. (End)
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (3-x-x^3) / ((x-1)^2*(1+x+x^2+x^3)).
a(n) = a(n-1) + a(n-4) - a(n-5), for n>4
a(n) = ( 2*n + 13+5*(-1)^n - 6*(-1)^((2*n + 3 + (-1)^n)/4) )/8.
E.g.f.: (1/8)*(2*x*exp(x) + 5*exp(-x) + 13*exp(x) + 6*sin(x) + 6*cos(x)). - G. C. Greubel, Sep 29 2015
|
|
EXAMPLE
|
G.f. = 3 + 2*x + 2*x^2 + x^3 + 4*x^4 + 3*x^5 + 3*x^6 + 2*x^7 + 5*x^8 + 4*x^9 + ...
|
|
MAPLE
|
A262672:=n->(2*n+13+5*(-1)^n-6*(-1)^((2*n+3+(-1)^n)/4))/8: seq(A262672(n), n=0..100);
|
|
MATHEMATICA
|
Table[(2n + 13 + 5 (-1)^n - 6 (-1)^((2n + 3 + (-1)^n)/4))/8, {n, 0, 100}]
LinearRecurrence[{1, 0, 0, 1, -1}, {3, 2, 2, 1, 4}, 100] (* Vincenzo Librandi, Sep 29 2015 *)
CoefficientList[Series[(3-x-x^3)/((x-1)^2(1+x+x^2+x^3)), {x, 0, 100}], x] (* Harvey P. Dale, May 26 2023 *)
|
|
PROG
|
(Magma) [(2*n+13+5*(-1)^n-6*(-1)^((2*n+3+(-1)^n) div 4))/8 : n in [0..100]];
(Magma) &cat[[3+n, 2+n, 2+n, 1+n]: n in [0..20]]; // Bruno Berselli, Sep 29 2015
(Magma) I:=[3, 2, 2, 1, 4]; [n le 5 select I[n] else Self(n-1) + Self(n-4) - Self(n-5): n in [1..100]]; // Vincenzo Librandi, Sep 29 2015
(PARI) a(n) = (2*n+13+5*(-1)^n-6*(-1)^((2*n+3+(-1)^n)/4))/8;
(PARI) {a(n) = my(k = n\4); [ 3, 2, 2, 1][n%4 + 1] + k}; /* Michael Somos, Oct 02 2015 */
|
|
CROSSREFS
|
Row 2 of the example in A238340 (read from bottom).
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|