Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A129602
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A129602 Replace in the binary expansion of n each run of k 0's (or 1's) with 2k-1 0's (or 1's), except in the most significant run, double the number of 0's (or 1's). +0
3
0, 3, 6, 15, 24, 13, 30, 63, 96, 49, 26, 55, 120, 61, 126, 255, 384, 193, 98, 199, 104, 53, 110, 223, 480, 241, 122, 247, 504, 253, 510, 1023, 1536, 769, 386, 775, 392, 197, 398, 799, 416, 209, 106, 215, 440, 221, 446, 895, 1920, 961, 482, 967, 488, 245, 494 (list; graph; listen)
OFFSET

0,2

EXAMPLE

a(1) = 3, as 1 is 1 in binary, and doubling the number of 1's (in the only run) gives binary 11, 3 in decimal. a(9) = 49, as 9 is 1001 in binary, and replacing the most significant run '1' with '11', and the center run '00' with '000' and the least significant run '1' with '1', we get 110001 in binary, 49 in decimal.

PROGRAM

(MIT Scheme: binexp->runcount1list and runcount1list->binexp given in A129594.)

(define (A129602 n) (if (zero? n) n (let ((rl (binexp->runcount1list n))) (runcount1list->binexp (cons (* 2 (car rl)) (map (lambda (i) (- (* 2 i) 1)) (cdr rl)))))))

CROSSREFS

Central diagonal of array A129600, a(n) = A129600bi(n,n). Cf. A129594. For n > 0, a(n) = A004760(A129603(n)+1).

Sequence in context: A061066 A093799 A087359 this_sequence A044888 A006639 A118035

Adjacent sequences: A129599 A129600 A129601 this_sequence A129603 A129604 A129605

KEYWORD

nonn,base

AUTHOR

Antti Karttunen (His-Firstname.His-Surname(AT)gmail.com), May 01 2007

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 25 07:41 EDT 2008. Contains 142293 sequences.


AT&T Labs Research