Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A082560
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
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
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; listen)
OFFSET

1,2

COMMENT

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

PROGRAM

(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 this_sequence A127202 A034701 A091857

Adjacent sequences: A082557 A082558 A082559 this_sequence A082561 A082562 A082563

KEYWORD

nonn

AUTHOR

Benoit Cloitre (benoit7848c(AT)orange.fr), May 04 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 November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research