login
A007891
A Kutz sequence.
1
1, 4, 1, 4, 9, 4, 9, 16, 9, 16, 25, 16, 25, 36, 25, 36, 49, 36, 49, 64, 49, 64, 81, 64, 81, 100, 81, 100, 121, 100, 121, 144, 121, 144, 169, 144, 169, 196, 169, 196, 225, 196, 225, 256, 225, 256, 289, 256, 289, 324, 289, 324, 361, 324, 361, 400, 361, 400, 441
OFFSET
1,2
LINKS
R. E. Kutz, Two unusual sequences, Two-Year College Mathematics Journal, 12 (1981), 316-319.
FORMULA
a(n) = (n-2*floor(n/3))^2. - Arkadiusz Wesolowski, Sep 28 2011
From Colin Barker, Aug 05 2016: (Start)
a(n) = a(n-1)+2*a(n-3)-2*a(n-4)-a(n-6)+a(n-7) for n>7.
G.f.: x*(1+3*x-3*x^2+x^3-x^4+x^5) / ((1-x)^3*(1+x+x^2)^2).
(End)
MATHEMATICA
Table[(n - 2*Floor[n/3])^2, {n, 60}] (* Arkadiusz Wesolowski, Sep 29 2011 *)
PROG
(Magma) [(n-2*Floor(n/3))^2: n in [1..60]]; // Vincenzo Librandi, Sep 30 2011
(PARI) a(n)=(n-n\3*2)^2 \\ Charles R Greathouse IV, Aug 05 2016
(PARI) Vec(x*(1+3*x-3*x^2+x^3-x^4+x^5)/((1-x)^3*(1+x+x^2)^2) + O(x^60)) \\ Colin Barker, Aug 05 2016
CROSSREFS
Sequence in context: A274092 A349039 A021245 * A165487 A344685 A201286
KEYWORD
nonn,easy
STATUS
approved