Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A153151
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A153151 Rotated binary decrementing: For n<2 a(n)=n, if n=2^k, a(n)=(2n)-1, otherwise a(n)=n-1. +0
4
0, 1, 3, 2, 7, 4, 5, 6, 15, 8, 9, 10, 11, 12, 13, 14, 31, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 63, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 127, 64, 65, 66, 67, 68, 69 (list; graph; listen)
OFFSET

0,3

LINKS

A. Karttunen, Table of n, a(n) for n = 0..2047

Index entries for sequences that are permutations of the natural numbers

PROGRAM

(MIT Scheme:) (define (A153151 n) (cond ((< n 2) n) ((pow2? n) (- (* 2 n) 1)) (else (- n 1))))

(define (pow2? n) (and (> n 0) (zero? (A004198bi n (- n 1)))))

CROSSREFS

Inverse: A153152. a(n) = A059893(A153141(A059893(n))) = A059894(A153142(A059894(n))).

Sequence in context: A166532 A135542 A130109 this_sequence A153154 A154438 A108644

Adjacent sequences: A153148 A153149 A153150 this_sequence A153152 A153153 A153154

KEYWORD

nonn,base

AUTHOR

Antti Karttunen (His-Firstname.His-Surname(AT)gmail.com), Dec 20 2008

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 December 15 00:47 EST 2009. Contains 170825 sequences.


AT&T Labs Research