login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A268711 Permutation of natural numbers: a(1) = 1, a(A268677(n)) = 2*a(n), a(A268678(n+1)) = 1+(2*a(n)). 3
1, 2, 3, 5, 7, 4, 11, 15, 6, 10, 9, 14, 8, 22, 23, 31, 30, 13, 21, 19, 12, 29, 17, 20, 18, 45, 47, 28, 16, 44, 63, 61, 46, 27, 62, 43, 39, 60, 26, 25, 59, 35, 42, 38, 24, 58, 41, 37, 34, 91, 40, 95, 57, 36, 90, 33, 89, 94, 127, 123, 56, 32, 88, 93, 55, 125, 126, 122, 87, 79, 92, 121, 54, 53, 51, 124, 86, 78, 120 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(1) = 1, for n > 1: if A268680(n) = A268680(n-1) [when n is in A268677] a(n) = 2*a(n-A268680(n)), otherwise [when n is in A268678] a(n) = 1 + 2*a(A268680(n)-1).
PROG
(Scheme, with memoization-macro definec)
(definec (A268711 n) (cond ((= 1 n) n) ((zero? (- (A268680 n) (A268680 (- n 1)))) (* 2 (A268711 (- n (A268680 n))))) (else (+ 1 (* 2 (A268711 (- (A268680 n) 1)))))))
CROSSREFS
Inverse: A268712.
Sequence in context: A212646 A369515 A103866 * A191439 A191723 A292874
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 11 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)