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.

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

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Dec 21 2015

Keywords

Comments

Invert blocks of five in the sequence of natural numbers.

Crossrefs

Programs

  • Magma
    [5+5*Floor(n/5)-n mod 5: n in [0..70]]; // Vincenzo Librandi, Dec 21 2015
    
  • Mathematica
    Table[5 + 5 Floor[n/5] - Mod[n, 5], {n, 0, 50}]
    CoefficientList[Series[(5 - x - x^2 - x^3 - x^4 + 4 x^5)/(x^6 - x^5 - x + 1), {x, 0, 50}], x] (* Vincenzo Librandi, Dec 21 2015 *)
    Reverse/@Partition[Range[80],5]//Flatten (* or *) LinearRecurrence[ {1,0,0,0,1,-1},{5,4,3,2,1,10},80] (* Harvey P. Dale, Sep 02 2016 *)
  • PARI
    a(n) = 5 + 5*(n\5) - (n % 5); \\ Michel Marcus, Dec 21 2015
    
  • PARI
    x='x+O('x^100); Vec((5-x-x^2-x^3-x^4+4*x^5)/(x^6-x^5-x+1)) \\ Altug Alkan, Dec 21 2015

Formula

G.f.: (5 - x - x^2 - x^3 - x^4 + 4*x^5)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4)).
a(n) = a(n-1) + a(n-5) - a(n-6) for n>5.
a(n) = 5 + 5*floor(n/5) - n mod 5.
a(n) = n+1+2*A257145(n+3). - R. J. Mathar, Apr 12 2019