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.

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

Original entry on oeis.org

1, 3, 5, 7, 2, 4, 6, 8, 9, 11, 13, 15, 10, 12, 14, 16, 17, 19, 21, 23, 18, 20, 22, 24, 25, 27, 29, 31, 26, 28, 30, 32, 33, 35, 37, 39, 34, 36, 38, 40, 41, 43, 45, 47, 42, 44, 46, 48, 49, 51, 53, 55, 50, 52, 54, 56, 57, 59, 61, 63, 58, 60, 62, 64, 65, 67, 69, 71, 66, 68, 70, 72, 73, 75, 77
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 15 2016

Keywords

Comments

4 consecutive odds, 4 consecutive evens.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 + 2 x + 2 x^2 + 2 x^3 - 5 x^4 + 2 x^5 + 2 x^6 + 2 x^7)/((1 - x)^2 (1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7)), {x, 0, 75}], x]
    LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 1, -1}, {1, 3, 5, 7, 2, 4, 6, 8, 9}, 75]
  • PARI
    my(x='x+O('x^99)); Vec((1+2*x+2*x^2+2*x^3-5*x^4+2*x^5+2*x^6+2*x^7)/((1-x)^2*(1+x+x^2+x^3+x^4+x^5+x^6+x^7))) \\ Altug Alkan, Apr 15 2016

Formula

G.f.: (1 + 2*x + 2*x^2 + 2*x^3 - 5*x^4 + 2*x^5 + 2*x^6 + 2*x^7)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7)).
a(n) = a(n-1) + a(n-8) - a(n-9).
a(n) = 1 + 2*n + 6*floor(n/8) - 7*floor(n/4). - Vaclav Kotesovec, Apr 15 2016
Sum_{n>=0} (-1)^n/a(n) = Pi/4 + log(2)/2. - Amiram Eldar, Feb 09 2023