This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A163617 #44 Apr 14 2023 10:07:19 %S A163617 0,3,6,7,12,15,14,15,24,27,30,31,28,31,30,31,48,51,54,55,60,63,62,63, %T A163617 56,59,62,63,60,63,62,63,96,99,102,103,108,111,110,111,120,123,126, %U A163617 127,124,127,126,127,112,115,118,119,124,127,126,127,120,123,126,127,124,127,126 %N A163617 a(2*n) = 2*a(n), a(2*n + 1) = 2*a(n) + 2 + (-1)^n, for all n in Z. %C A163617 Fibbinary numbers (A003714) give all integers n >= 0 for which a(n) = 3*n. %C A163617 From _Antti Karttunen_, Feb 21 2016: (Start) %C A163617 Fibbinary numbers also give all integers n >= 0 for which a(n) = A048724(n). %C A163617 Note that there are also other multiples of three in the sequence, for example, A163617(99) = 231 ("11100111" in binary) = 3*77, while 77 ("1001101" in binary) is not included in A003714. Note that 99 is "1100011" in binary. %C A163617 (End) %H A163617 Reinhard Zumkeller, <a href="/A163617/b163617.txt">Table of n, a(n) for n = 0..10000</a> %F A163617 a(n) = -A163618(-n) for all n in ZZ. %F A163617 Conjecture: a(n) = A003188(n) + (6*n + 1 - (-1)^n)/4. - _Velin Yanev_, Dec 17 2016 %e A163617 G.f. = 3*x + 6*x^2 + 7*x^3 + 12*x^4 + 15*x^5 + 14*x^6 + 15*x^7 + 24*x^8 + 27*x^9 + ... %p A163617 A163617 := n -> Bits:-Or(2*n, n): %p A163617 seq(A163617(n), n=0..62); # _Peter Luschny_, Sep 23 2019 %t A163617 Table[BitOr[n, 2*n], {n, 0, 100}] (* _Vladimir Joseph Stephan Orlovsky_, Jul 19 2011 *) %o A163617 (PARI) {a(n) = bitor(n, n<<1)}; %o A163617 (PARI) {a(n) = if( n==0 || n==-1, n, 2 * a(n \ 2) + (n%2) * (2 + (-1)^(n \ 2)))}; %o A163617 (Haskell) %o A163617 import Data.Bits ((.|.), shiftL) %o A163617 a163617 n = n .|. shiftL n 1 :: Integer %o A163617 -- _Reinhard Zumkeller_, Mar 06 2013 %o A163617 (Scheme) (define (A163617 n) (A003986bi n (+ n n))) ;; Here A003986bi implements dyadic bitwise-OR operation (see A003986) - _Antti Karttunen_, Feb 21 2016 %o A163617 (Julia) %o A163617 using IntegerSequences %o A163617 A163617List(len) = [Bits("OR", n, n<<1) for n in 0:len] %o A163617 println(A163617List(62)) # _Peter Luschny_, Sep 26 2021 %Y A163617 Cf. A003986, A048724, A213370, A163618. %Y A163617 Cf. also A269161. %K A163617 nonn %O A163617 0,2 %A A163617 _Michael Somos_, Aug 01 2009 %E A163617 Comment about Fibbinary numbers rephrased by _Antti Karttunen_, Feb 21 2016