A185170 a(n) = floor( (2*n^2 - 6*n + 9) / 5).
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
Keywords
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 + ...
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- B. Hasselblatt and J. Propp, Degree-Growth of Monomial Maps
- Index entries for linear recurrences with constant coefficients, signature (2, -1, 0, 0, 1, -2, 1).
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
Comments