The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A141685 a(1) = 1, a(n) = Sum_{k=1..n} (k mod 3) * a(n-k) for n >= 2. 1
 1, 1, 3, 5, 12, 25, 54, 116, 249, 535, 1149, 2468, 5301, 11386, 24456, 52529, 112827, 242341, 520524, 1118033, 2401422, 5158012, 11078889, 23796335, 51112125, 109783684, 235804269, 506483762, 1087875984, 2336647777, 5018883507 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Lim_{n -> infinity} a(n+1)/a(n) = 2.1478990357047874. LINKS G. C. Greubel, Table of n, a(n) for n = 1..1001 Wikipedia, Hessenberg matrix Index entries for linear recurrences with constant coefficients, signature (1,2,1). FORMULA a(n) = Sum_{k=1..n} (k mod 3) * a(n-k). If p[i] = modp(i,3) and if A is Hessenberg matrix of order n defined by: A[i,j] = p[j-i+1], (i<=j), A[i,j] = -1, (i= j+1), and A[i,j]=0 otherwise. Then, for n >= 1, a(n+1) = det A. - Milan Janjic, May 02 2010 G.f.: x*(1-x)*(1+x+x^2)/(1-x-2*x^2-x^3). - Colin Barker, Feb 01 2012 MATHEMATICA a[1]=1; a[n_]:= Sum[Mod[k, 3]*a[n-k], {k, 1, n}]; Table[a[n], {n, 1, 35}] Join[{1}, LinearRecurrence[{1, 2, 1}, {1, 3, 5}, 35]] (* G. C. Greubel, Apr 06 2019 *) PROG (PARI) my(x='x+O('x^35)); Vec(x*(1-x^3)/(1-x-2*x^2-x^3)) \\ G. C. Greubel, Apr 06 2019 (Magma) I:=[1, 3, 5]; [1] cat [n le 3 select I[n] else Self(n-1) +2*Self(n -2)+Self(n-3): n in [1..35]]; // G. C. Greubel, Apr 06 2019 (Sage) a=(x*(1-x^3)/(1-x-2*x^2-x^3)).series(x, 35).coefficients(x, sparse=False); a[1:] # G. C. Greubel, Apr 06 2019 CROSSREFS Sequence in context: A030270 A129757 A135019 * A017921 A280000 A241097 Adjacent sequences: A141682 A141683 A141684 * A141686 A141687 A141688 KEYWORD nonn AUTHOR Roger L. Bagula and Gary W. Adamson, Sep 08 2008 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 7 03:39 EDT 2024. Contains 375008 sequences. (Running on oeis4.)