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!)
A020956 a(n) = Sum_{k>=1} floor(tau^(n-k)) where tau is A001622. 7

%I #51 Apr 06 2024 07:52:57

%S 1,2,4,8,14,25,42,71,117,193,315,514,835,1356,2198,3562,5768,9339,

%T 15116,24465,39591,64067,103669,167748,271429,439190,710632,1149836,

%U 1860482,3010333,4870830,7881179,12752025,20633221,33385263,54018502,87403783,141422304

%N a(n) = Sum_{k>=1} floor(tau^(n-k)) where tau is A001622.

%H Colin Barker, <a href="/A020956/b020956.txt">Table of n, a(n) for n = 1..1000</a>

%H Clark Kimberling, <a href="http://www.jstor.org/stable/2975195">Problem 10520</a>, Amer. Math. Mon. 103 (1996) p. 347.

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

%F G.f.: x*(1-x^2+x^3)/((1-x-x^2)*(1+x)*(1-x)^2). - _Ralf Stephan_, Apr 08 2004

%F a(n) = Lucas(n+1) - floor(n/2) - 1.

%F a(n) = Sum_{k=0..n-1} A014217(k).

%F a(n) = 2^(-2-n)*((-2)^n - 5*2^n + 2*(1-t)^(1+n) + 2*(1+t)^n + 2*t*(1+t)^n - 2^(1+n)*n) where t=sqrt(5). - _Colin Barker_, Feb 09 2017

%F From _G. C. Greubel_, Apr 05 2024: (Start)

%F a(n) = Lucas(n+1) - (1/4)*(2*n + 5 - (-1)^n).

%F E.g.f.: exp(x/2)*(cosh(sqrt(5)*x/2) + sqrt(5)*sinh(sqrt(5)*x/2)) - (1/2)*((x+2)*cosh(x) + (x+3)*sinh(x)). (End)

%t LinearRecurrence[{2,1,-3,0,1}, {1,2,4,8,14}, 40] (* _Vincenzo Librandi_, Nov 01 2016 *)

%o (Python)

%o prpr = 0

%o prev = 1

%o for n in range(2,100):

%o print(prev, end=", ")

%o curr = prpr+prev + n//2

%o prpr = prev

%o prev = curr

%o # _Alex Ratushnyak_, Jul 30 2012

%o (PARI) Vec(x*(1-x^2+x^3)/((1-x-x^2)*(1+x)*(1-x)^2) + O(x^50)) \\ _Michel Marcus_, Nov 01 2016

%o (Magma)

%o I:=[1,2,4,8,14]; [n le 5 select I[n] else 2*Self(n-1)+Self(n-2)-3*Self(n-3)+Self(n-5): n in [1..40]]; // _Vincenzo Librandi_, Nov 01 2016

%o (Magma) [Lucas(n+1)-(2*n+5-(-1)^n)/4: n in [1..40]]; // _G. C. Greubel_, Apr 05 2024

%o (SageMath) [lucas_number2(n+1,1,-1) -(n+2+(n%2))//2 for n in range(1,41)] # _G. C. Greubel_, Apr 05 2024

%Y Cf. A000032, A001622, A014217, A281362.

%K nonn,easy

%O 1,2

%A _Clark Kimberling_

%E More terms from _Vladeta Jovovic_, Apr 04 2002

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 April 26 16:04 EDT 2024. Contains 372003 sequences. (Running on oeis4.)