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!)
A022441 a(n) = c(n) + c(n-1) where c (A055562) is the sequence of numbers not in a. 4

%I #45 Sep 08 2022 08:44:46

%S 1,5,7,10,14,17,20,23,25,28,31,34,37,40,43,46,50,53,56,59,62,65,68,71,

%T 74,77,80,83,86,89,92,95,97,100,103,106,109,112,115,118,121,124,127,

%U 130,133,136,139,142,145,148,151,154,157,160,163,166,169,172,175,178

%N a(n) = c(n) + c(n-1) where c (A055562) is the sequence of numbers not in a.

%H Ivan Neretin, <a href="/A022441/b022441.txt">Table of n, a(n) for n = 0..10000</a>

%H J-P. Bode, H. Harborth, C. Kimberling, <a href="https://www.fq.math.ca/Papers1/45-3/bode.pdf">Complementary Fibonacci sequences</a>, Fibonacci Quarterly 45 (2007), 254-264.

%H R. Stephan, <a href="/somedcgf.html">Some divide-and-conquer sequences ...</a>

%H R. Stephan, <a href="/A079944/a079944.ps">Table of generating functions</a>

%F a(n) + a(n-1) = 3n + 2 - (floor(log_2 n) mod 2) for n >= 1. - _Jeffrey Shallit_, Jun 08 2000

%F For n>0, a(n) = b(n) with b(0)=0, b(2n) = -b(n)+9n+3, b(2n+1) = -b(n)+9n+6-[n==0]. - _Ralf Stephan_, Oct 24 2003

%F a(n) = A210770(2*n+1). - _Reinhard Zumkeller_, Mar 25 2012

%p A022441 := n-> `if`(n=0, 1, 3*n + 2 - (ilog2(n) mod 2)):

%p seq(A022441(n), n= 0..59);

%t Fold[Append[#1, Plus @@ Complement[Range[Max@#1 + 3], #1][[{#2 + 1, #2 + 2}]]] &, {1, 5}, Range[58]] (* _Ivan Neretin_, Mar 30 2017 *)

%t Table[If[n==0,1, 3*n+2 - Mod[Floor[Log[n]/Log[2]], 2]], {n,0,30}] (* _G. C. Greubel_, Mar 08 2018 *)

%o (PARI) for(n=0,30, print1(if(n==0,1, 3*n+2 - (floor(log(n)/log(2))%2)), ", ")) \\ _G. C. Greubel_, Mar 08 2018

%o (Magma) [1] cat [3*n + 2 - (Floor((Log(n)/Log(2))) mod 2): n in [0..10]]; // _G. C. Greubel_, Mar 08 2018

%Y Cf. A055562 (complement), A022424.

%K nonn,easy

%O 0,2

%A _Clark Kimberling_

%E More terms from Winston C. Yang (winston(AT)cs.wisc.edu), Aug 23 2000

%E Term a(16)=50 fixed by _Ivan Neretin_, Mar 30 2017

%E Updated by _Clark Kimberling_, Feb 19 2018

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 07:35 EDT 2024. Contains 371922 sequences. (Running on oeis4.)