login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004755 Binary expansion starts 11. 19
3, 6, 7, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

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

LINKS

Kenny Lau, Table of n, a(n) for n = 1..16383 (first 1023 terms from T. D. Noe)

R. Stephan, Some divide-and-conquer sequences ...

R. Stephan, Table of generating functions

FORMULA

a(2n) = 2a(n), a(2n+1) = 2a(n) + 1 + 2*[n==0].

a(n) = n + 2 * 2^floor(log_2(n)) = A004754(n) + A053644(n).

a(n) = 2n + A080079(n). - Benoit Cloitre, Feb 22 2003

G.f.: (1/(1+x)) * (1 + Sum_{k>=0, t=x^2^k} 2^k*(2t+t^2)/(1+t)).

a(n) = n + 2^(floor(log_2(n)) + 1) = n + A062383(n). - Franklin T. Adams-Watters, Oct 23 2006

a(2^m+k) = 2^(m+1) + 2^m + k, m >= 0, 0 <= k < 2^m. - Yosu Yurramendi, Aug 08 2016

EXAMPLE

12 in binary is 1100, so 12 is in sequence.

MAPLE

a:= proc(n) n+2*2^floor(log(n)/log(2)) end: seq(a(n), n=1..60); # Muniru A Asiru, Oct 16 2018

MATHEMATICA

Flatten[Table[FromDigits[#, 2]&/@(Join[{1, 1}, #]&/@Tuples[{0, 1}, n]), {n, 0, 5}]] (* Harvey P. Dale, Feb 05 2015 *)

PROG

(PARI) a(n)=n+2*2^floor(log(n)/log(2))

(PARI) is(n)=n>2 && binary(n)[2] \\ Charles R Greathouse IV, Sep 23 2012

(Haskell)

import Data.List (transpose)

a004755 n = a004755_list !! (n-1)

a004755_list = 3 : concat (transpose [zs, map (+ 1) zs])

                   where zs = map (* 2) a004755_list

-- Reinhard Zumkeller, Dec 04 2015

(Python)

f = open('b004755.txt', 'w')

lo = 3

hi = 4

i = 1

while i<16384:

....for x in range(lo, hi):

........f.write(str(i)+" "+str(x)+"\n")

........i += 1

....lo <<= 1

....hi <<= 1

# Kenny Lau, Jul 05 2016

CROSSREFS

Equals union of A079946 and A080565.

Cf. A004754 (10), A004756 (100), A004757 (101), A004758 (110), A004759 (111).

Cf. A004760, A053644, A062050, A076877.

Sequence in context: A028802 A141742 * A004760 A186083 A093906 A152829

Adjacent sequences:  A004752 A004753 A004754 * A004756 A004757 A004758

KEYWORD

nonn,base,easy,changed

AUTHOR

N. J. A. Sloane

EXTENSIONS

Edited by Ralf Stephan, Oct 12 2003

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 16:01 EDT 2018. Contains 316424 sequences. (Running on oeis4.)