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.

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

This page as a plain text file.
%I A236343 #41 Jul 13 2025 10:58:46
%S A236343 1,1,3,5,6,9,12,14,18,22,25,30,35,39,45,51,56,63,70,76,84,92,99,108,
%T A236343 117,125,135,145,154,165,176,186,198,210,221,234,247,259,273,287,300,
%U A236343 315,330,344,360,376,391,408,425,441,459,477,494,513,532,550,570,590
%N A236343 Expansion of (1 - x + 2*x^2 - x^3) / ((1 - x)^2 * (1 - x^3)) in powers of x.
%C A236343 The sequence is a quasi-polynomial sequence.
%C A236343 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(-2) = x, b(-4) = -b(-3) = -b(-1) = 1. Then the denominator of b(n) is x^a(n).
%H A236343 G. C. Greubel, <a href="/A236343/b236343.txt">Table of n, a(n) for n = 0..2500</a>
%H A236343 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,1,-2,1).
%F A236343 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.
%F A236343 G.f.: (1 - x + 2*x^2 - x^3) / ((1 - x)^2 * (1 - x^3)).
%F A236343 Second difference is period 3 sequence [2, 0, -1, ...].
%F A236343 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).
%F A236343 a(-6-n) = A236337(n).
%F A236343 From _Peter Bala_, Feb 11 2019: (Start)
%F A236343 a(3*n)   = (1/2)*(n + 1)*(3*n + 2);
%F A236343 a(3*n+1) = (1/2)*(n + 1)*(3*n + 4) - 1;
%F A236343 a(3*n+2) = (1/2)*(n + 1)*(3*n + 6). (End)
%e A236343 G.f. = 1 + x + 3*x^2 + 5*x^3 + 6*x^4 + 9*x^5 + 12*x^6 + 14*x^7 + 18*x^8 + ...
%p A236343 seq(coeff(series((1-x+2*x^2-x^3)/((1-x)^2*(1-x^3)),x,n+1), x, n), n = 0 .. 60); # _Muniru A Asiru_, Feb 12 2019
%t A236343 CoefficientList[Series[(1-x+2*x^2-x^3)/((1-x)^2*(1-x^3)), {x, 0, 60}], x] (* _G. C. Greubel_, Aug 07 2018 *)
%o A236343 (PARI) {a(n) = (n * (n+5) + [6, 0, 4][n%3 + 1]) / 6};
%o A236343 (PARI) {a(n) = if( n<0, polcoeff( x^2 * (-1 + 2*x - x^2 + x^3) / ((1 - x)^2 * (1 - x^3)) + x * O(x^-n), -n), polcoeff( (1 - x + 2*x^2 - x^3) / ((1 - x)^2 * (1 - x^3)) + x * O(x^n), n))};
%o A236343 (Magma) m:=60; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x+2*x^2-x^3)/((1-x)^2*(1-x^3)))); // _G. C. Greubel_, Aug 07 2018
%o A236343 (Sage) ((1-x+2*x^2-x^3)/((1-x)^2*(1-x^3))).series(x, 60).coefficients(x, sparse=False) # _G. C. Greubel_, Feb 12 2019
%Y A236343 Cf. A236337. Trisections are A000326, A095794, A045943.
%K A236343 nonn,easy
%O A236343 0,3
%A A236343 _Michael Somos_, Jan 22 2014