OFFSET
0,2
COMMENTS
Beginning with the third term, the first differences are the odd positive integers. - John W. Layman, Feb 28 2012
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
For n>2, a(n) = n^2-1. The values of m are all values from 2n+1 to (n+1)^2 except 2n+3 and n^2+2n-1. - David Wasserman, Sep 16 2004
From Colin Barker, Feb 15 2016: (Start)
a(n) = n^2-1 for n>2.
a(n) = 3*a(n-1)-3*a(n-2)+a(n-3) for n>5.
G.f.: (1-x+x^2+x^3+x^4-x^5) / (1-x)^3.
(End)
MATHEMATICA
Join[{1, 2, 4}, LinearRecurrence[{3, -3, 1}, {8, 15, 24}, 80]] (* and *) Join[{1, 2, 4}, Table[n^2 - 1, {n, 3, 80}]] (* Vladimir Joseph Stephan Orlovsky, Feb 13 2012 *)
PROG
(PARI) Vec((1-x+x^2+x^3+x^4-x^5)/(1-x)^3 + O(x^100)) \\ Colin Barker, Feb 15 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Naohiro Nomoto, May 05 2003
EXTENSIONS
More terms from David Wasserman, Sep 16 2004
STATUS
approved