Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A086799
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A086799 Replace all trailing 0's by 1's in binary representation of n. +0
3
1, 3, 3, 7, 5, 7, 7, 15, 9, 11, 11, 15, 13, 15, 15, 31, 17, 19, 19, 23, 21, 23, 23, 31, 25, 27, 27, 31, 29, 31, 31, 63, 33, 35, 35, 39, 37, 39, 39, 47, 41, 43, 43, 47, 45, 47, 47, 63, 49, 51, 51, 55, 53, 55, 55, 63, 57, 59, 59, 63, 61, 63, 63, 127, 65, 67, 67, 71, 69, 71 (list; graph; listen)
OFFSET

1,2

COMMENT

a(n) = n + 2^A007814(n) - 1;

a(n) is odd; a(n) = n iff n is odd;

a(a(n)) = a(n); A007814(a(n)) = a(n); A000265(a(n)) = a(n);

A023416(a(n)) = A023416(n) - A007814(n) = A086784(n);

A000120(a(n)) = A000120(n) + A007814(n);

a(2^n) = a(A000079(n)) = 2*2^n - 1 = A000051(n+1).

a(n) = A006519(n) + n - 1. - Reinhard Zumkeller, Feb 02 2007

LINKS

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

R. Stephan, Table of generating functions

Eric Weisstein's World of Mathematics, Binary Carry Sequence

Eric Weisstein's World of Mathematics, Odd Part

Index entries for sequences related to binary expansion of n

FORMULA

a(n) = if n is odd then n else a(n/2)*2 + 1.

a(n) = n OR n-1 (bitwise OR of consecutive numbers) - Russ Cox (rsc(AT)swtch.com), May 15 2007

EXAMPLE

a(20) = a('10100') = '10100' + '11' = '10111' = 23.

PROGRAM

(C:) int a(int n) { return n | (n-1); } - Russ Cox (rsc(AT)swtch.com), May 15 2007

CROSSREFS

Cf. A007088.

Sequence in context: A096633 A118362 A137695 this_sequence A098688 A129266 A129527

Adjacent sequences: A086796 A086797 A086798 this_sequence A086800 A086801 A086802

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller (reinhard.zumkeller(AT)lhsystems.com), Aug 05 2003

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified July 26 13:41 EDT 2008. Contains 142293 sequences.


AT&T Labs Research