cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A236337 Expansion of (2 - x) / ((1 - x)^2 * (1 - x^3)) in powers of x.

Original entry on oeis.org

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

Views

Author

Michael Somos, Jan 22 2014

Keywords

Comments

The sequence is a quasi-polynomial sequence.
Given a sequence of Laurent polynomials defined by b(n) = (b(n-2)^2 - b(n-1)*b(n-3) * 2/x) / b(n-4), b(-4) = x, b(-3) = b(-2) = -b(-1) = 1. Then the denominator of b(n) is x^a(n).

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 + ...
		

Crossrefs

Cf. A236343. Trisections are A005449, A045943, A115067.

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