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.

A185170 a(n) = floor( (2*n^2 - 6*n + 9) / 5).

Original entry on oeis.org

1, 1, 1, 1, 3, 5, 9, 13, 17, 23, 29, 37, 45, 53, 63, 73, 85, 97, 109, 123, 137, 153, 169, 185, 203, 221, 241, 261, 281, 303, 325, 349, 373, 397, 423, 449, 477, 505, 533, 563, 593, 625, 657, 689, 723, 757, 793, 829, 865, 903, 941, 981, 1021, 1061, 1103, 1145
Offset: 0

Views

Author

Michael Somos, Dec 26 2012

Keywords

Comments

Hasselblatt and Propp on page 8 mentions the sequence as degrees of iterates of (w, x, y, z) -> (x, y, z, z*(w*z - x*y) / (w*y - x*x)). That is, if b(0) = w, b(1) = x, b(2) = y, b(3) = z, b(n) = b(n-1) * (b(n-1)*b(n-4) - b(n-2)*b(n-3)) / (b(n-2)*b(n-4) - b(n-3)*b(n-3)), then b(n) is a rational function such that the total degree of the numerator is a(n) and the denominator is a(n)-1. Also b(n) is a Laurent monomial in variables {w, x, y, z, wz-xy, wy-xx, xz-yy}.
A quasipolynomial. - Charles R Greathouse IV, Dec 28 2012

Examples

			G.f. = 1 + x + x^2 + x^3 + 3*x^4 + 5*x^5 + 9*x^6 + 13*x^7 + 17*x^8 + 23*x^9 + ...
		

Crossrefs

Cf. A130520.

Programs

  • Magma
    [Floor((2*n^2-6*n+9)/5): n in [0..50]]; // G. C. Greubel, Aug 10 2018
  • Mathematica
    Table[Floor[(2 n^2 - 6 n + 9)/5], {n, 0, 60}] (* or *) LinearRecurrence[ {2,-1,0,0,1,-2,1},{1,1,1,1,3,5,9},60] (* Harvey P. Dale, Dec 28 2012 *)
    a[ n_] := Quotient[ 2 n^2 - 6 n + 9, 5]; (* Michael Somos, Apr 25 2015 *)
  • Maxima
    A185170(n):=floor((2*n^2-6*n+9)/5)$ makelist(A185170(n),n,0,30); /* Martin Ettl, Dec 28 2012 */
    
  • PARI
    {a(n) = (2*n^2 - 6*n + 9) \ 5};
    

Formula

G.f.: (1 - x + 2*x^4 - x^5 + 3*x^6) / ((1 - x)^2 * (1 - x^5)).
a(n) = a(3-n) for all n in Z.
Second difference has period 5.
a(0)=1, a(1)=1, a(2)=1, a(3)=1, a(4)=3, a(5)=5, a(6)=9, a(n)=2*a(n-1)- a(n-2)+ a(n-5)-2*a(n-6)+a (n-7). - Harvey P. Dale, Dec 28 2012