The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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

%I #26 Sep 08 2022 08:45:35

%S 1,1,3,5,12,25,54,116,249,535,1149,2468,5301,11386,24456,52529,112827,

%T 242341,520524,1118033,2401422,5158012,11078889,23796335,51112125,

%U 109783684,235804269,506483762,1087875984,2336647777,5018883507

%N a(1) = 1, a(n) = Sum_{k=1..n} (k mod 3) * a(n-k) for n >= 2.

%C Lim_{n -> infinity} a(n+1)/a(n) = 2.1478990357047874.

%H G. C. Greubel, <a href="/A141685/b141685.txt">Table of n, a(n) for n = 1..1001</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Hessenberg_matrix">Hessenberg matrix</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,1).

%F a(n) = Sum_{k=1..n} (k mod 3) * a(n-k).

%F 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

%F G.f.: x*(1-x)*(1+x+x^2)/(1-x-2*x^2-x^3). - _Colin Barker_, Feb 01 2012

%t a[1]=1; a[n_]:= Sum[Mod[k, 3]*a[n-k], {k,1,n}]; Table[a[n], {n, 1, 35}]

%t Join[{1}, LinearRecurrence[{1,2,1}, {1,3,5}, 35]] (* _G. C. Greubel_, Apr 06 2019 *)

%o (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

%o (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

%o (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

%K nonn

%O 1,3

%A _Roger L. Bagula_ and _Gary W. Adamson_, Sep 08 2008

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 06:19 EDT 2024. Contains 372703 sequences. (Running on oeis4.)