OFFSET
1,2
COMMENTS
This sequence is related to A010702 by a(n) = (Sum_{i=1..n} A010702(i)) - A010702(n+1). - Bruno Berselli, Mar 12 2012
LINKS
David Lovler, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = 7*n - a(n-1) - 10 with n > 1, a(1)=1. - Vincenzo Librandi, Aug 05 2010
From R. J. Mathar, Oct 08 2011: (Start)
a(n) = 7*n/2 - 13/4 - 3*(-1)^n/4.
G.f.: x*(1+2*x+4*x^2) / ( (1+x)*(x-1)^2 ). (End)
E.g.f.: 4 + ((14*x - 13)*exp(x) - 3*exp(-x))/4. - David Lovler, Sep 11 2022
MATHEMATICA
With[{c=7 Range[0, 50]}, Sort[Join[c+1, c+3]]] (* or *) LinearRecurrence[ {1, 1, -1}, {1, 3, 8}, 100] (* Harvey P. Dale, May 29 2012 *)
PROG
(PARI) a(n) = (14*n - 13 - 3*(-1)^n)/4 \\ David Lovler, Sep 11 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved