A236337 Expansion of (2 - x) / ((1 - x)^2 * (1 - x^3)) in powers of x.
2, 3, 4, 7, 9, 11, 15, 18, 21, 26, 30, 34, 40, 45, 50, 57, 63, 69, 77, 84, 91, 100, 108, 116, 126, 135, 144, 155, 165, 175, 187, 198, 209, 222, 234, 246, 260, 273, 286, 301, 315, 329, 345, 360, 375, 392, 408, 424, 442, 459, 476, 495, 513, 531, 551, 570, 589
Offset: 0
Examples
G.f. = 2 + 3*x + 4*x^2 + 7*x^3 + 9*x^4 + 11*x^5 + 15*x^6 + 18*x^7 + 21*x^8 + ...
Links
- G. C. Greubel, Table of n, a(n) for n = 0..2500
- Paul Barry, Generalized Catalan recurrences, Riordan arrays, elliptic curves, and orthogonal polynomials, arXiv:1910.00875 [math.CO], 2019.
- Cristian Cobeli, Aaditya Raghavan, and Alexandru Zaharescu, On the central ball in a translation invariant involutive field, arXiv:2408.01864 [math.NT], 2024. See p. 7.
- Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1).
Programs
-
Magma
m:=60; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!((2-x)/((1-x)^2*(1-x^3)))); // G. C. Greubel, Aug 07 2018 -
Mathematica
CoefficientList[Series[(2-x)/((1-x)^2*(1-x^3)), {x, 0, 60}], x] (* Vaclav Kotesovec, Jan 22 2014 *)
-
PARI
{a(n) = ((n+1) * (n+6) + [6, 4, 0][n%3 + 1]) / 6};
-
PARI
{a(n) = if( n<0, polcoeff( x^4 * (-1 + 2*x) / ((1 - x)^2 * (1 - x^3)) + x * O(x^-n), -n), polcoeff( (2 - x) / ((1 - x)^2 * (1 - x^3)) + x * O(x^n), n))};
-
Sage
((2-x)/((1-x)^2*(1-x^3))).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Feb 11 2019
Formula
0 = a(n)*(a(n+2) + a(n+3)) + a(n+1)*(-2*a(n+2) - a(n+3) + a(n+4)) + a(n+2)*(a(n+2) - 2*a(n+3) + a(n+4)) for all n in Z.
G.f.: (2 - x) / ((1 - x)^2 * (1 - x^3)).
Second difference is period 3 sequence [0, 2, -1, ...].
a(n) = 2*a(n-3) - a(n-6) + 3 = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
a(-6 - n) = A236343(n).
a(3*n) = (1/2)*(n + 1)*(3*n + 4); a(3*n+1) = (1/2)*(n + 1)*(3*n + 6); a(3*n+2) = (1/2)*(n + 1)*(3*n + 8). - Peter Bala, Feb 11 2019
Comments