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!)
A168195 a(n) = 2*n - a(n-1) + 1 with n>1, a(1)=5. 1

%I #35 Feb 23 2023 03:49:30

%S 5,0,7,2,9,4,11,6,13,8,15,10,17,12,19,14,21,16,23,18,25,20,27,22,29,

%T 24,31,26,33,28,35,30,37,32,39,34,41,36,43,38,45,40,47,42,49,44,51,46,

%U 53,48,55,50,57,52,59,54,61,56,63,58,65,60,67,62,69,64,71,66,73

%N a(n) = 2*n - a(n-1) + 1 with n>1, a(1)=5.

%H Vincenzo Librandi, <a href="/A168195/b168195.txt">Table of n, a(n) for n = 1..1000</a>

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

%F From _R. J. Mathar_, Nov 22 2009: (Start)

%F a(n) = a(n-1) + a(n-2) - a(n-3) = n + 1 - 3*(-1)^n.

%F G.f.: x*(5+2*x^2-5*x)/((1+x)*(x-1)^2). (End)

%F a(n) = n - 4 + 2^(2-(-1)^n). - _Wesley Ivan Hurt_, Dec 13 2013

%F a(n) = A004442(n-1) + 2*(1-(-1)^n) = A147677(n) - floor((n+3)/2). - _Filip Zaludek_, Oct 31 2016

%F Sum_{n>=3} (-1)^n/a(n) = 23/15 - log(2). - _Amiram Eldar_, Feb 23 2023

%p A168195:=n->n+1-3*(-1)^n; seq(A168195(n), n=1..100); # _Wesley Ivan Hurt_, Dec 13 2013

%t LinearRecurrence[{1,1,-1},{5,0,7},30] (* _Vincenzo Librandi_, Feb 27 2012 *)

%o (Magma) I:=[5,0,7]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..40]]; // _Vincenzo Librandi_, Feb 27 2012

%Y Cf. A004442, A147677.

%K nonn,easy

%O 1,1

%A _Vincenzo Librandi_, Nov 20 2009

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 24 19:59 EDT 2024. Contains 371963 sequences. (Running on oeis4.)