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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A082560 a(1)=1, a(n)=2*a(n-1) if n is odd, or a(n)=a(n/2)+1 if n is even. 0
1, 2, 4, 3, 6, 5, 10, 4, 8, 7, 14, 6, 12, 11, 22, 5, 10, 9, 18, 8, 16, 15, 30, 7, 14, 13, 26, 12, 24, 23, 46, 6, 12, 11, 22, 10, 20, 19, 38, 9, 18, 17, 34, 16, 32, 31, 62, 8, 16, 15, 30, 14, 28, 27, 54, 13, 26, 25, 50, 24, 48, 47, 94, 7, 14, 13, 26, 12, 24, 23, 46, 11, 22, 21, 42, 20 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

b(1)=1, b(n)=2*b(n/2) if n is even, or b(n)=b(n-1)+1 if n is odd produces the sequence of natural numbers.

FORMULA

if n is in A010737 : a(n)=n-1

PROG

(PARI) a(n)=if(n<2, 1, if(n%2, 2*a(n-1), 1+a(n/2)))

CROSSREFS

Sequence in context: A129767 A119618 A113321 * A191598 A127202 A179869

Adjacent sequences:  A082557 A082558 A082559 * A082561 A082562 A082563

KEYWORD

nonn

AUTHOR

Benoit Cloitre (benoit7848c(AT)orange.fr), May 04 2003

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

Content is available under The OEIS End-User License Agreement .

Last modified February 14 23:04 EST 2012. Contains 205686 sequences.