cp's OEIS Frontend

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.

A004755 Binary expansion starts 11.

This page as a plain text file.
%I A004755 #61 Jul 13 2022 10:14:41
%S A004755 3,6,7,12,13,14,15,24,25,26,27,28,29,30,31,48,49,50,51,52,53,54,55,56,
%T A004755 57,58,59,60,61,62,63,96,97,98,99,100,101,102,103,104,105,106,107,108,
%U A004755 109,110,111,112,113,114,115,116,117,118,119,120,121,122
%N A004755 Binary expansion starts 11.
%C A004755 a(n) is the smallest value > a(n-1) (or > 1 for n=1) for which A001511(a(n)) = A001511(n). - _Franklin T. Adams-Watters_, Oct 23 2006
%H A004755 Kenny Lau, <a href="/A004755/b004755.txt">Table of n, a(n) for n = 1..16383</a> (first 1023 terms from T. D. Noe)
%H A004755 Ralf Stephan, <a href="/somedcgf.html">Some divide-and-conquer sequences ...</a>
%H A004755 Ralf Stephan, <a href="/A079944/a079944.ps">Table of generating functions</a>
%F A004755 a(2n) = 2*a(n), a(2n+1) = 2*a(n) + 1 + 2*[n==0].
%F A004755 a(n) = n + 2 * 2^floor(log_2(n)) = A004754(n) + A053644(n).
%F A004755 a(n) = 2n + A080079(n). - _Benoit Cloitre_, Feb 22 2003
%F A004755 G.f.: (1/(1+x)) * (1 + Sum_{k>=0, t=x^2^k} 2^k*(2t+t^2)/(1+t)).
%F A004755 a(n) = n + 2^(floor(log_2(n)) + 1) = n + A062383(n). - _Franklin T. Adams-Watters_, Oct 23 2006
%F A004755 a(2^m+k) = 2^(m+1) + 2^m + k, m >= 0, 0 <= k < 2^m. - _Yosu Yurramendi_, Aug 08 2016
%e A004755 12 in binary is 1100, so 12 is in the sequence.
%p A004755 a:= proc(n) n+2*2^floor(log(n)/log(2)) end: seq(a(n),n=1..60); # _Muniru A Asiru_, Oct 16 2018
%t A004755 Flatten[Table[FromDigits[#,2]&/@(Join[{1,1},#]&/@Tuples[{0,1},n]),{n,0,5}]] (* _Harvey P. Dale_, Feb 05 2015 *)
%o A004755 (PARI) a(n)=n+2*2^floor(log(n)/log(2))
%o A004755 (PARI) is(n)=n>2 && binary(n)[2] \\ _Charles R Greathouse IV_, Sep 23 2012
%o A004755 (Haskell)
%o A004755 import Data.List (transpose)
%o A004755 a004755 n = a004755_list !! (n-1)
%o A004755 a004755_list = 3 : concat (transpose [zs, map (+ 1) zs])
%o A004755                    where zs = map (* 2) a004755_list
%o A004755 -- _Reinhard Zumkeller_, Dec 04 2015
%o A004755 (Python)
%o A004755 f = open('b004755.txt', 'w')
%o A004755 lo = 3
%o A004755 hi = 4
%o A004755 i = 1
%o A004755 while i<16384:
%o A004755     for x in range(lo,hi):
%o A004755         f.write(str(i)+" "+str(x)+"\n")
%o A004755         i += 1
%o A004755     lo <<= 1
%o A004755     hi <<= 1
%o A004755 # _Kenny Lau_, Jul 05 2016
%o A004755 (Python)
%o A004755 def A004755(n): return n+(1<<n.bit_length()) # _Chai Wah Wu_, Jul 13 2022
%Y A004755 Equals union of A079946 and A080565.
%Y A004755 Cf. A004754 (10), A004756 (100), A004757 (101), A004758 (110), A004759 (111).
%Y A004755 Cf. A004760, A053644, A062050, A076877.
%K A004755 nonn,base,easy
%O A004755 1,1
%A A004755 _N. J. A. Sloane_
%E A004755 Edited by _Ralf Stephan_, Oct 12 2003