|
|
A242774
|
|
a(n) = ceiling( n / 2 ) + ceiling( n / 3 ).
|
|
2
|
|
|
2, 2, 3, 4, 5, 5, 7, 7, 8, 9, 10, 10, 12, 12, 13, 14, 15, 15, 17, 17, 18, 19, 20, 20, 22, 22, 23, 24, 25, 25, 27, 27, 28, 29, 30, 30, 32, 32, 33, 34, 35, 35, 37, 37, 38, 39, 40, 40, 42, 42, 43, 44, 45, 45, 47, 47, 48, 49, 50, 50, 52, 52, 53, 54, 55, 55, 57
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x * (2 + 2*x + x^2) / (1 - x^2 - x^3 + x^5) = (2*x + 2*x^2 + x^3) / ((1 - x^2) * (1 - x^3)).
E.g.f.: 5*x*exp(x)/6 - exp(-x)/4 + 7*exp(x)/12 + sin(sqrt(3)*x/2)*exp(-x/2)/(3*sqrt(3)) - cos(sqrt(3)*x/2)*exp(-x/2)/3. - Ilya Gutkovskiy, Apr 13 2016
|
|
EXAMPLE
|
G.f. = 2*x + 2*x^2 + 3*x^3 + 4*x^4 + 5*x^5 + 5*x^6 + 7*x^7 + 7*x^8 + ...
|
|
MAPLE
|
|
|
MATHEMATICA
|
a[ n_] := Ceiling[ n / 2 ] + Ceiling[ n / 3 ];
LinearRecurrence[{0, 1, 1, 0, -1}, {2, 2, 3, 4, 5}, 100] (* Vincenzo Librandi, Apr 15 2016 *)
Rest[CoefficientList[Series[x*(2+2*x+x^2)/(1-x^2-x^3+x^5), {x, 0, 50}], x]] (* G. C. Greubel, Aug 06 2018 *)
|
|
PROG
|
(PARI) {a(n) = ceil( n / 2 ) + ceil( n / 3 )};
(PARI) {a(n) = if( n<0, polcoeff( -(x^2 + 2*x^3 + 2*x^4) / ((1 - x^2) * (1 - x^3)) + x * O(x^-n), -n), polcoeff( (2*x + 2*x^2 + x^3) / ((1 - x^2) * (1 - x^3)) + x * O(x^n), n))};
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(2+2*x+x^2)/(1-x^2-x^3+x^5))); // G. C. Greubel, Aug 06 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|