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.

A238738 Expansion of (1 + 2*x + 2*x^2)/(1 - x - 2*x^3 + 2*x^4 + x^6 - x^7).

Original entry on oeis.org

1, 3, 5, 7, 11, 15, 18, 24, 30, 34, 42, 50, 55, 65, 75, 81, 93, 105, 112, 126, 140, 148, 164, 180, 189, 207, 225, 235, 255, 275, 286, 308, 330, 342, 366, 390, 403, 429, 455, 469, 497, 525, 540, 570, 600, 616, 648, 680, 697, 731, 765, 783, 819, 855, 874
Offset: 0

Views

Author

Bruno Berselli, Mar 04 2014

Keywords

Comments

Subsequence of A008732: a(n) = A008732(A047212(n+1)).
See also Deléham's example in A008732: these numbers are in the first (A000566), third (A005475) and fifth (A028895) column.

Examples

			G.f.: 1 + 3*x + 5*x^2 + 7*x^3 + 11*x^4 + 15*x^5 + 18*x^6 + 24*x^7 + ...
		

Crossrefs

Cf. A000212 (see illustration above), A000217, A008732, A211538.

Programs

  • Magma
    m:=60; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+2*x+2*x^2)/(1-x-2*x^3+2*x^4+x^6-x^7)));
    
  • Mathematica
    CoefficientList[Series[(1 + 2 x + 2 x^2)/(1 - x - 2 x^3 + 2 x^4 + x^6 - x^7), {x, 0, 60}], x]
  • Maxima
    makelist(coeff(taylor((1+2*x+2*x^2)/(1-x-2*x^3+2*x^4+x^6-x^7), x, 0, n), x, n), n, 0, 60);
    
  • PARI
    Vec((1+2*x+2*x^2)/(1-x-2*x^3+2*x^4+x^6-x^7)+O(x^60))
    
  • Sage
    m = 60; L. = PowerSeriesRing(ZZ, m); f = (1+2*x+2*x^2)/(1-x-2*x^3+2*x^4+x^6-x^7); print(f.coefficients())

Formula

G.f.: (1 + 2*x + 2*x^2) / ((1 - x)^3*(1 + x + x^2)^2).
a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7), with n>6.
a(3k) = k*(5*k + 7)/2 + 1 (A000566);
a(3k+1) = k*(5*k + 11)/2 + 3 (A005475);
a(3k+2) = k*(5*k + 15)/2 + 5 (A028895).
a(n) = (floor(n/3)+1)*(4*n-7*floor(n/3)+2)/2. [Luce ETIENNE, Jun 14 2014]