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!)
A022340 Even Fibbinary numbers (A003714); also 2*Fibbinary(n). 21

%I #39 Nov 02 2023 03:24:00

%S 0,2,4,8,10,16,18,20,32,34,36,40,42,64,66,68,72,74,80,82,84,128,130,

%T 132,136,138,144,146,148,160,162,164,168,170,256,258,260,264,266,272,

%U 274,276,288,290,292,296,298,320,322,324,328,330,336,338,340,512

%N Even Fibbinary numbers (A003714); also 2*Fibbinary(n).

%C Positions of ones in binomial(3k+2,k+1)/(3k+2) modulo 2 (A085405). - _Paul D. Hanna_, Jun 29 2003

%C Construction: start with strings S(0)={0}, S(1)={2}; for k>=2, concatenate all prior strings excluding S(k-1) and add 2^k to each element in the resulting string to obtain S(k); this sequence is the concatenation of all such generated strings: {S(0),S(1),S(2),...}. Example: for k=5, concatenate {S(0),S(1),S(2),S(3)} = {0, 2, 4, 8,10}; add 2^5 to each element to obtain S(5)={32,34,38,40,42}. - _Paul D. Hanna_, Jun 29 2003

%C From _Gus Wiseman_, Apr 08 2020: (Start)

%C The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions. This sequence lists all numbers k such that the k-th composition in standard order has no ones. For example, the sequence together with the corresponding compositions begins:

%C 0: () 80: (2,5) 260: (6,3)

%C 2: (2) 82: (2,3,2) 264: (5,4)

%C 4: (3) 84: (2,2,3) 266: (5,2,2)

%C 8: (4) 128: (8) 272: (4,5)

%C 10: (2,2) 130: (6,2) 274: (4,3,2)

%C 16: (5) 132: (5,3) 276: (4,2,3)

%C 18: (3,2) 136: (4,4) 288: (3,6)

%C 20: (2,3) 138: (4,2,2) 290: (3,4,2)

%C 32: (6) 144: (3,5) 292: (3,3,3)

%C 34: (4,2) 146: (3,3,2) 296: (3,2,4)

%C 36: (3,3) 148: (3,2,3) 298: (3,2,2,2)

%C 40: (2,4) 160: (2,6) 320: (2,7)

%C 42: (2,2,2) 162: (2,4,2) 322: (2,5,2)

%C 64: (7) 164: (2,3,3) 324: (2,4,3)

%C 66: (5,2) 168: (2,2,4) 328: (2,3,4)

%C 68: (4,3) 170: (2,2,2,2) 330: (2,3,2,2)

%C 72: (3,4) 256: (9) 336: (2,2,5)

%C 74: (3,2,2) 258: (7,2) 338: (2,2,3,2)

%C (End)

%H Reinhard Zumkeller, <a href="/A022340/b022340.txt">Table of n, a(n) for n = 0..10000</a>

%F For n>0, a(F(n))=2^n, a(F(n)-1)=A001045(n+2)-1, where F(n) is the n-th Fibonacci number with F(0)=F(1)=1.

%F a(n) + a(n)/2 = a(n) XOR a(n)/2, see A106409. - _Reinhard Zumkeller_, May 02 2005

%t f[n_Integer] := Block[{k = Ceiling[ Log[ GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k-- ]; FromDigits[fr, 2]]; Select[f /@ Range[0, 95], EvenQ[ # ] &] (* _Robert G. Wilson v_, Sep 18 2004 *)

%t Select[Range[2, 512, 2], BitAnd[#, 2#] == 0 &] (* _Alonso del Arte_, Jun 18 2012 *)

%o (Haskell)

%o a022340 = (* 2) . a003714 -- _Reinhard Zumkeller_, Feb 03 2015

%o (Python)

%o from itertools import count, islice

%o def A022340_gen(startvalue=0): # generator of terms >= startvalue

%o return filter(lambda n:not n&(n>>1),count(max(0,startvalue+(startvalue&1)),2))

%o A022340_list = list(islice(A022340_gen(),30)) # _Chai Wah Wu_, Sep 07 2022

%Y Equals 2 * A003714.

%Y Cf. A006013, A001045, A085405, A085407.

%Y Compositions with no ones are counted by A212804.

%Y All of the following pertain to compositions in standard order (A066099):

%Y - Length is A000120.

%Y - Compositions without terms > 2 are A003754.

%Y - Compositions without ones are A022340 (this sequence).

%Y - Sum is A070939.

%Y - Compositions with no twos are A175054.

%Y - Strict compositions are A233564.

%Y - Constant compositions are A272919.

%Y - Normal compositions are A333217.

%Y - Runs-resistance is A333628.

%Y Cf. A066099, A124767, A228351, A318928, A333218.

%K nonn

%O 0,2

%A _Marc LeBrun_

%E Edited by _Ralf Stephan_, Sep 01 2004

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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)