[go: up one dir, main page]

login
A270193
Permutation of natural numbers: a(1) = 1, a(A269389(1+n)) = 2 * a(n), a(A269399(n)) = 1 + 2*a(n).
6
1, 2, 3, 4, 5, 6, 8, 10, 7, 9, 12, 11, 16, 20, 13, 14, 17, 18, 24, 22, 32, 40, 26, 28, 34, 21, 36, 48, 44, 15, 19, 64, 25, 23, 80, 52, 56, 68, 42, 33, 41, 72, 96, 88, 27, 30, 38, 29, 35, 37, 128, 49, 50, 46, 160, 104, 112, 136, 84, 66, 45, 82, 144, 192, 65, 176, 81, 53, 54, 57, 60, 76, 58, 70, 74, 256, 98, 69, 100, 43, 92
OFFSET
1,2
FORMULA
a(1) = 1, for n > 1, if A137264(6+n) = 0 [when n is in A269399], a(n) = 1 + 2*a(n-A269362(n)), otherwise a(n) = 2 * a(A269362(n)-1).
PROG
(Scheme, with memoization-macro definec)
(definec (A270193 n) (cond ((= 1 n) n) ((not (zero? (A137264 (+ 6 n)))) (* 2 (A270193 (+ -1 (A269362 n))))) (else (+ 1 (* 2 (A270193 (- n (A269362 n))))))))
CROSSREFS
Inverse: A270194.
Similar permutations: A270199, A270201 (compare the scatter plots).
Sequence in context: A038101 A073956 A360414 * A039266 A039205 A039154
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Mar 16 2016
STATUS
approved