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.

A008747 Expansion of (1+x^4)/((1-x)*(1-x^2)*(1-x^3)).

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 9, 11, 14, 17, 21, 24, 29, 33, 38, 43, 49, 54, 61, 67, 74, 81, 89, 96, 105, 113, 122, 131, 141, 150, 161, 171, 182, 193, 205, 216, 229, 241, 254, 267, 281, 294, 309, 323, 338, 353, 369, 384, 401, 417, 434, 451, 469, 486, 505, 523, 542, 561
Offset: 0

Views

Author

Keywords

Comments

For n>=1, the set {A008747(6n+-1)} is the set of numbers of the form a^2 + 5*(a+1)^2 for -inf < a < inf. Furthermore the set A008747(6n) is A033581(n). - Kieren MacMillan, Dec 19 2007
For n>1, a(n-1) is the number of aperiodic necklaces (Lyndon words) with k<=3 black beads and n-k white beads. For n=4 we have for example a(3)=3 aperiodic necklaces: BWWW, BBWW and BBBW. BWBW is periodic and is not counted. - Herbert Kociemba, Oct 23 2016

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 5*x^4 + 6*x^5 + 9*x^6 + 11*x^7 + 14*x^8 + ...
		

Crossrefs

Programs

  • GAP
    a:=[1,1,2,3,5,6];; for n in [7..60] do a[n]:=a[n-1]+a[n-2]-a[n-4] -a[n-5]+a[n-6]; od; a; # G. C. Greubel, Aug 03 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1+x^4)/((1-x)*(1-x^2)*(1-x^3)) )); // G. C. Greubel, Aug 03 2019
    
  • Maple
    A008747:=n->ceil((n+1)^2/6): seq(A008747(n), n=0..100); # Wesley Ivan Hurt, Oct 25 2016
  • Mathematica
    CoefficientList[Series[(1+x^4)/((1-x)(1-x^2)(1-x^3)),{x,0,60}],x] (* or *) LinearRecurrence[{1,1,0,-1,-1,1},{1,1,2,3,5,6},60] (* Harvey P. Dale, Sep 05 2012 *)
  • PARI
    Vec((1+x^4)/((1-x)*(1-x^2)*(1-x^3))+O(x^60)) \\ Charles R Greathouse IV, Sep 25 2012
    
  • Sage
    ((1+x^4)/((1-x)*(1-x^2)*(1-x^3))).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Aug 03 2019
    

Formula

G.f.: (1+x^4)/((1-x)*(1-x^2)*(1-x^3)).
a(n) = ceiling((n+1)^2/6).
a(n) = (12*n + 23 + 6*n^2 + 9*(-1)^n + 4*A061347(n))/36. - R. J. Mathar, Mar 15 2011
a(0)=1, a(1)=1, a(2)=2, a(3)=3, a(4)=5, a(5)=6, a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6) for n > 5. - Harvey P. Dale, Sep 05 2012
From Michael Somos, Oct 25 2016: (Start)
Euler transform of length 8 sequence [ 1, 1, 1, 1, 0, 0, 0, -1].
a(n) = a(-2-n) for all n in Z.
a(2*n-1) = A071619(n).
a(3*n-1) = 2*A077043(n).
a(n) - a(n-1) = A051274(n). (End)