Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A075157
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A075157 Run lengths in the binary expansion of n gives the vector of exponents in prime factorization of a(n)+1, with the least significant run corresponding to the exponent of the least prime, 2. +0
6
0, 1, 2, 3, 5, 4, 8, 7, 11, 14, 6, 9, 17, 24, 26, 15, 23, 44, 34, 29, 13, 10, 20, 19, 35, 74, 48, 49, 53, 124, 80, 31, 47, 134, 174, 89, 69, 76, 104, 59, 27, 32, 12, 21, 41, 54, 62, 39, 71, 224, 244, 149, 97, 120, 146, 99, 107, 374, 342, 249, 161, 624, 242, 63, 95, 404 (list; graph; listen)
OFFSET

0,3

COMMENT

To make this a permutation of nonnegative integers, we subtract one from each run count except for the most significant run, e.g. a(11) = 9, as 11 = 1011 and 9+1 = 10 = 5^1 * 3^(1-1) * 2^(2-1).

LINKS

Index entries for sequences that are permutations of the natural numbers

PROGRAM

(MIT Scheme with Aubrey Jaffer's SLIB library:)

(require 'factor)

(define (A075157 n) (-1+ (binruns->primefactorization n)))

(define (binruns->primefactorization n) (let loop ((n n) (i 0) (p (modulo (1+ n) 2)) (z 1)) (cond ((zero? n) (* z (A008578 i))) ((= (modulo n 2) p) (loop (floor->exact (/ n 2)) i (modulo n 2) (* z (A008578 i)))) (else (loop (floor->exact (/ n 2)) (1+ i) (modulo n 2) z)))))

(define (A008578 n) (cond ((< n 3) (1+ n)) (else (list-ref (primes> 0 n) (-1+ n)))))

CROSSREFS

Inverse of A075158. a(n) = A075159(n+1)-1. a(A000975(n)) = A006093(n) = A000040(n)-1. Cf. A008578, A056539, A059900, A075162.

Sequence in context: A127522 A048673 A096070 this_sequence A046708 A120255 A059450

Adjacent sequences: A075154 A075155 A075156 this_sequence A075158 A075159 A075160

KEYWORD

nonn

AUTHOR

Antti Karttunen Sep 13 2002

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