The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A318388 a(1) = 1, a(n) = -floor(e*a(n/2)) if n is even, a(n) = n - a(n-1) if n is odd. 1

%I

%S 1,-2,5,6,-1,-13,20,-16,25,3,8,36,-23,-54,69,44,-27,-67,86,-8,29,-21,

%T 44,-97,122,63,-36,147,-118,-187,218,-119,152,74,-39,183,-146,-233,

%U 272,22,19,-78,121,58,-13,-119,166,264,-215,-331,382,-171,224,98,-43,-399,456,321,-262,509,-448,-592,655,324,-259,-413

%N a(1) = 1, a(n) = -floor(e*a(n/2)) if n is even, a(n) = n - a(n-1) if n is odd.

%H Altug Alkan, <a href="/A318388/b318388.txt">Table of n, a(n) for n = 1..10752</a>

%t Nest[Append[#1, If[EvenQ@ #2, -Floor[E #1[[#2/2]] ], #2 - #1[[-1]] ]] & @@ {#, Length@ # + 1} &, {1}, 65] (* _Michael De Vlieger_, Aug 25 2018 *)

%o (PARI) a(n)=if(n==1, 1, if(n%2==0, -floor(exp(1)*a(n/2)), n-a(n-1)));

%Y Cf. A001113, A317825.

%K sign,look

%O 1,2

%A _Altug Alkan_, Aug 25 2018

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

Last modified January 28 07:04 EST 2020. Contains 331317 sequences. (Running on oeis4.)