OFFSET
3,4
COMMENTS
Third differences seem to be A002620(n)+1.
LINKS
G. C. Greubel, Table of n, a(n) for n = 3..1000
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
From Colin Barker, Nov 28 2014: (Start)
a(n) = (-39 +55*n -15*n^2 +2*n^3 +(-1)^n*(135 -39*n +3*n^2))/96 for n>3.
G.f.: x^3*(1 -3*x^2 +x^3 +4*x^4 -x^5 -2*x^6 +x^7)/((1-x)^4*(1+x)^3). (End)
E.g.f.: ( 8*(x^3 -3*x^2 +6*x -6) +(x^3 -3*x^2 +39*x +48)*cosh(x) +(x^3 -6*x^2 +3*x -87)*sinh(x) )/48. - G. C. Greubel, Jan 23 2020
MAPLE
seq( `if`(n=3, 1, (-39 +55*n -15*n^2 +2*n^3 +(-1)^n*(135 -39*n +3*n^2))/96), n=3..60); # G. C. Greubel, Jan 23 2020
MATHEMATICA
Table[If[n==3, 1, (-39 +55*n -15*n^2 +2*n^3 +(-1)^n*(135 -39*n +3*n^2))/96], {n, 3, 60}] (* G. C. Greubel, Jan 23 2020 *)
LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {1, 1, 1, 2, 3, 5, 7, 11}, 50] (* Harvey P. Dale, Jan 28 2023 *)
PROG
(PARI) vector(60, n, my(m=n+2); if(m==3, 1, (-39 +55*m -15*m^2 +2*m^3 +(-1)^m*(135 -39*m +3*m^2))/96)) \\ G. C. Greubel, Jan 23 2020
(Magma) [1] cat [(-39 +55*n -15*n^2 +2*n^3 +(-1)^n*(135 -39*n +3*n^2))/96: n in [4..60]]; // G. C. Greubel, Jan 23 2020
(Sage) [1]+[(-39 +55*n -15*n^2 +2*n^3 +(-1)^n*(135 -39*n +3*n^2))/96 for n in (4..60)] # G. C. Greubel, Jan 23 2020
(GAP) Concatenation([1], List([4..60], n-> (-39 +55*n -15*n^2 +2*n^3 +(-1)^n*(135 -39*n +3*n^2))/96 )); # G. C. Greubel, Jan 23 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 28 2000
STATUS
approved