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.

A133310 a(3n) = 2n+1, a(3n+1) = 2n+2, a(3n+2) = 2n+1.

Original entry on oeis.org

1, 2, 1, 3, 4, 3, 5, 6, 5, 7, 8, 7, 9, 10, 9, 11, 12, 11, 13, 14, 13, 15, 16, 15, 17, 18, 17, 19, 20, 19, 21, 22, 21, 23, 24, 23, 25, 26, 25, 27, 28, 27, 29, 30, 29, 31, 32, 31, 33, 34, 33, 35, 36, 35, 37, 38, 37, 39, 40, 39, 41, 42, 41, 43, 44, 43, 45, 46, 45, 47, 48, 47, 49, 50
Offset: 0

Views

Author

Paul Curtz, Oct 18 2007

Keywords

Crossrefs

Cf. A130823 (1, 1, 1, 3, 3, 3).

Programs

  • Magma
    Q:=Rationals(); R:=PowerSeriesRing(Q, 70); Coefficients(R!((1+x-x^2+x^3)/((1+x+x^2)*(x-1)^2))) // G. C. Greubel, Feb 10 2018
  • Mathematica
    CoefficientList[Series[(1+x-x^2+x^3)/((1+x+x^2)*(x-1)^2), {x, 0, 50}], x] (* G. C. Greubel, Feb 10 2018 *)
    LinearRecurrence[{1, 0, 1, -1}, {1, 2, 1, 3}, 74] (* Robert G. Wilson v, Feb 10 2018 *)
  • PARI
    my(x='x+O('x^70)); Vec((1+x-x^2+x^3)/((1+x+x^2)*(x-1)^2)) \\ G. C. Greubel, Feb 10 2018
    

Formula

G.f.: ( 1+x-x^2+x^3 ) / ( (1+x+x^2)*(x-1)^2 ). - R. J. Mathar, May 23 2014
a(n) = (2/9)*(3*n+3+3*cos(2*(n-1)*Pi/3)-2*sqrt(3)*sin(2*(n-1)*Pi/3)). - Wesley Ivan Hurt, Sep 30 2017