[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a079559 -id:a079559
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(1) = 0, a(2) = 1, for n > 2, if A079559(n) = 0, a(n) = 2*a(A256992(n)), otherwise a(n) = 1 + 2*a(A256992(n)).
+20
10
0, 1, 3, 7, 2, 6, 15, 5, 14, 13, 31, 4, 12, 30, 11, 29, 10, 27, 63, 28, 26, 9, 25, 62, 61, 23, 8, 24, 60, 22, 59, 21, 58, 55, 127, 20, 54, 57, 53, 126, 19, 51, 56, 52, 18, 125, 123, 50, 47, 17, 124, 122, 49, 121, 46, 45, 119, 16, 48, 120, 44, 118, 43, 117, 42, 111, 255, 116, 110, 41, 109, 254, 115, 107, 40, 108, 114, 253, 39, 106, 103
OFFSET
1,3
COMMENTS
Note the indexing: the domain starts from 1, while the range includes also zero.
FORMULA
a(1) = 0, a(2) = 1, for n > 2, if A079559(n) = 0 [when n is a term of A055938], a(n) = 2*a(A256992(n)), otherwise a(n) = 1 + 2*a(A256992(n)).
As a composition of other permutations:
a(n) = A054429(A279343(n)).
a(n) = A279343(A279347(n)).
a(n) = A243071(A279338(n)).
Other identities. For all n >= 1:
A000120(a(n)) = A279345(n).
For all n >= 2, A070939(a(n)) = A256993(n).
PROG
(Scheme) (definec (A279341 n) (cond ((<= n 2) (- n 1)) ((zero? (A079559 n)) (* 2 (A279341 (A256992 n)))) (else (+ 1 (* 2 (A279341 (A256992 n)))))))
CROSSREFS
Inverse: A279342.
Related or similar permutations: A054429, A243071, A279338, A279343, A279347.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 10 2016
STATUS
approved
a(1) = 0, and for n > 1, if A079559(n) = 0, a(n) = 1 + 2*a(A256992(n)), otherwise a(n) = 2*a(A256992(n)).
+20
10
0, 1, 2, 4, 3, 5, 8, 6, 9, 10, 16, 7, 11, 17, 12, 18, 13, 20, 32, 19, 21, 14, 22, 33, 34, 24, 15, 23, 35, 25, 36, 26, 37, 40, 64, 27, 41, 38, 42, 65, 28, 44, 39, 43, 29, 66, 68, 45, 48, 30, 67, 69, 46, 70, 49, 50, 72, 31, 47, 71, 51, 73, 52, 74, 53, 80, 128, 75, 81, 54, 82, 129, 76, 84, 55, 83, 77, 130, 56, 85, 88, 78, 131, 57, 86
OFFSET
1,3
COMMENTS
Note the indexing: the domain starts from 1, while the range includes also zero.
FORMULA
a(1) = 0, and for n > 1, if A079559(n) = 0 [when n is a term of A055938], a(n) = 1 + 2*a(A256992(n)), otherwise a(n) = 2*a(A256992(n)).
As a composition of other permutations:
a(n) = A054429(A279341(n)).
a(n) = A279341(A279347(n)).
a(n) = A156552(A279338(n)).
Other identities. For all n >= 1:
A000120(a(n)) = A279346(n).
For all n >= 2, A070939(a(n)) = A256993(n).
PROG
(Scheme) (definec (A279343 n) (cond ((= 1 n) 0) ((zero? (A079559 n)) (+ 1 (* 2 (A279343 (A256992 n))))) (else (* 2 (A279343 (A256992 n))))))
CROSSREFS
Inverse: A279344.
Related or similar permutations: A054429, A156552, A279338, A279341, A279347.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 10 2016
STATUS
approved
If A079559(n) = 1, a(n) = A213714(n) - 1, otherwise a(n) = A234017(n).
+20
9
0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 5, 6, 7, 7, 8, 8, 9, 10, 9, 10, 11, 12, 11, 13, 14, 12, 13, 14, 15, 15, 16, 16, 17, 18, 17, 18, 19, 20, 19, 21, 22, 20, 21, 22, 23, 24, 23, 25, 26, 24, 25, 27, 28, 26, 29, 30, 27, 28, 29, 30, 31, 31, 32, 32, 33, 34, 33, 34, 35, 36, 35, 37, 38, 36, 37, 38, 39, 40, 39, 41, 42, 40, 41, 43, 44, 42
OFFSET
1,4
COMMENTS
In other words, if n = A005187(k) for some k >= 1, then a(n) = k-1, otherwise it must be that n = A055938(h) for some h, and then a(n) = h.
In binary trees like A233276 and A233278, a(n) gives the contents at the parent node of node containing n, for any n >= 1.
When iterating a(n), a(a(n)), a(a(a(n))), and so on, A070939(n) = A256478(n) + A256479(n) = A257248(n) + A257249(n) gives the number of steps needed to reach zero, from any starting value n >= 1.
LINKS
FORMULA
If A079559(n) = 1, a(n) = A213714(n) - 1, otherwise a(n) = A234017(n).
a(n) = A256992(n) - A079559(n) = A213714(n) + A234017(n) - A079559(n).
PROG
(Scheme) (define (A256991 n) (if (not (zero? (A079559 n))) (+ -1 (A213714 n)) (A234017 n)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 15 2015
STATUS
approved
a(1) = 1, for n > 1, if A079559(n) = 0, a(n) = 2*a(A256992(n)), otherwise a(n) = A003961(a(A256992(n))).
+20
9
1, 2, 3, 5, 4, 6, 7, 9, 10, 15, 11, 8, 12, 14, 25, 21, 18, 35, 13, 20, 30, 27, 45, 22, 33, 49, 16, 24, 28, 50, 55, 75, 42, 77, 17, 36, 70, 63, 105, 26, 125, 175, 40, 60, 54, 39, 65, 90, 121, 81, 44, 66, 135, 99, 98, 147, 91, 32, 48, 56, 100, 110, 245, 165, 150, 143, 19, 84, 154, 225, 231, 34, 275, 385, 72, 140, 126, 51, 343, 210, 539, 189, 52
OFFSET
1,2
COMMENTS
A more recursed variant of A279336.
FORMULA
a(1) = 1; for n > 1, if A079559(n) = 0 [when n is a term of A055938], a(n) = 2*a(A256992(n)), otherwise a(n) = A003961(a(A256992(n))).
As a composition of other permutations:
a(n) = A163511(A279341(n)).
a(n) = A005940(1+A279343(n)).
a(n) = A250246(A279348(n)).
PROG
(Scheme)
(definec (A279338 n) (cond ((= 1 n) n) ((zero? (A079559 n)) (* 2 (A279338 (A256992 n)))) (else (A003961 (A279338 (A256992 n))))))
CROSSREFS
Inverse: A279339.
Related or similar permutations: A005940, A163511, A250246, A279336, A279341, A279343, A279348.
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Dec 10 2016
STATUS
approved
a(0) = 0; and for n >= 1, if A079559(n) = 1, then a(n) = 1 + a(A213714(n)-1), otherwise a(n) = a(A234017(n)).
+20
7
0, 1, 1, 2, 2, 1, 2, 3, 3, 2, 2, 3, 1, 2, 3, 4, 4, 3, 3, 3, 2, 2, 4, 2, 3, 3, 4, 1, 2, 3, 4, 5, 5, 4, 4, 4, 3, 3, 4, 3, 3, 3, 5, 2, 2, 4, 3, 4, 2, 4, 5, 3, 3, 2, 3, 4, 4, 5, 1, 2, 3, 4, 5, 6, 6, 5, 5, 5, 4, 4, 5, 4, 4, 4, 5, 3, 3, 4, 4, 4, 3, 4, 6, 3, 3, 3, 3, 5, 5, 4, 2, 2, 4, 3, 5, 3, 4, 5, 6, 2, 4, 4, 4, 5, 3, 4, 3, 3, 2, 5, 5, 3, 6, 2, 4, 4, 3, 4, 5, 5, 6, 1, 2, 3, 4, 5, 6, 7, 7
OFFSET
0,4
COMMENTS
a(n) tells how many nonzero terms of A005187 are encountered when traversing toward the root of binary tree A233276, starting from the node containing n. This count includes both n (in case it is a term of A005187) and 1 (but not 0). See also comments in A256479 and A256991.
The 1's (seem to) occur at positions given by A000325.
LINKS
FORMULA
a(0) = 0; and for n >= 1, if A079559(n) = 1, then a(n) = 1 + a(A213714(n)-1), otherwise a(n) = a(A234017(n)).
a(n) = A000120(A233277(n)). [Binary weight of A233277(n).]
Other identities and observations. For all n >= 1:
a(n) = 1 + A257248(n) = 1 + A080791(A233275(n)).
a(n) = A070939(n) - A256479(n).
a(n) >= A255559(n).
PROG
(Scheme, with memoization-macro definec)
(definec (A256478 n) (if (< n 1) n (+ (A079559 n) (A256478 (if (zero? (A079559 n)) (A234017 n) (+ -1 (A213714 n)))))))
;; Alternative definitions:
(define (A256478 n) (A000120 (A233277 n)))
(define (A256478 n) (if (zero? n) n (+ 1 (A080791 (A233275 n)))))
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 15 2015
STATUS
approved
a(1) = 0, and for n > 1, if A079559(n) = 0, then a(n) = 1 + a(A234017(n)), otherwise a(n) = a(A213714(n)-1).
+20
6
0, 1, 0, 1, 2, 1, 0, 1, 2, 2, 1, 3, 2, 1, 0, 1, 2, 2, 2, 3, 3, 1, 3, 2, 2, 1, 4, 3, 2, 1, 0, 1, 2, 2, 2, 3, 3, 2, 3, 3, 3, 1, 4, 4, 2, 3, 2, 4, 2, 1, 3, 3, 4, 3, 2, 2, 1, 5, 4, 3, 2, 1, 0, 1, 2, 2, 2, 3, 3, 2, 3, 3, 3, 2, 4, 4, 3, 3, 3, 4, 3, 1, 4, 4, 4, 4, 2, 2, 3, 5, 5, 3, 4, 2, 4, 3, 2, 1, 5, 3, 3, 3, 2, 4, 3, 4, 4, 5, 2, 2, 4, 1, 5, 3, 3, 4, 3, 2, 2, 1, 6, 5, 4, 3, 2, 1, 0, 1
OFFSET
1,5
COMMENTS
a(n) tells how many terms of A055938 are encountered when traversing toward the root of binary tree A233276, starting from the node containing n. This count includes also n in case it itself is a term of A055938. See also comments in A256478 and A256991.
LINKS
FORMULA
a(1) = 0, and for n > 1, if A079559(n) = 0, then a(n) = 1 + a(A234017(n)), otherwise a(n) = a(A213714(n)-1).
a(n) = A080791(A233277(n)). [Number of nonleading zeros in the binary representation of A233277(n).]
Other identities. For all n >= 1:
a(n) = A257249(n) - 1 = A000120(A233275(n)) - 1.
a(n) = A070939(n) - A256478(n).
a(A000225(n)) = 0.
PROG
(Scheme, with memoization-macro definec)
(definec (A256479 n) (if (<= n 1) 0 (+ (- 1 (A079559 n)) (A256479 (if (zero? (A079559 n)) (A234017 n) (+ -1 (A213714 n)))))))
;; Alternative definitions:
(define (A256479 n) (A080791 (A233277 n)))
(define (A256479 n) (+ -1 (A000120 (A233275 n))))
CROSSREFS
One less than A257249.
Cf. also A000225 (gives the positions zeros).
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 15 2015
STATUS
approved
a(1) = 0; and for n > 1, if A079559(n) = 1, then a(n) = 1 + a(A213714(n)-1), otherwise a(n) = a(A234017(n)).
+20
4
0, 0, 1, 1, 0, 1, 2, 2, 1, 1, 2, 0, 1, 2, 3, 3, 2, 2, 2, 1, 1, 3, 1, 2, 2, 3, 0, 1, 2, 3, 4, 4, 3, 3, 3, 2, 2, 3, 2, 2, 2, 4, 1, 1, 3, 2, 3, 1, 3, 4, 2, 2, 1, 2, 3, 3, 4, 0, 1, 2, 3, 4, 5, 5, 4, 4, 4, 3, 3, 4, 3, 3, 3, 4, 2, 2, 3, 3, 3, 2, 3, 5, 2, 2, 2, 2, 4, 4, 3, 1, 1, 3, 2, 4, 2, 3, 4, 5, 1, 3, 3, 3, 4, 2, 3, 2, 2, 1, 4, 4, 2, 5, 1, 3, 3, 2, 3, 4, 4, 5, 0, 1, 2, 3, 4, 5, 6, 6
OFFSET
1,7
COMMENTS
a(n) tells how many nonzero terms of A005187 are encountered when traversing toward the root of binary tree A233276, starting from the node containing n and before 1 is reached. This count includes both n (in case it is a term of A005187) but excludes the 1 and 0 at the root. See also comments in A257249, A256478 and A256991.
LINKS
FORMULA
a(1) = 0; and for n > 1, if A079559(n) = 1, then a(n) = 1 + a(A213714(n)-1), otherwise a(n) = a(A234017(n)).
a(n) = A080791(A233275(n)). [Number of nonleading zeros in the binary representation of A233275(n).]
Other identities. For all n >= 1:
a(n) = A256478(n)-1 = A000120(A233277(n))-1.
a(n) = A070939(n) - A257249(n).
PROG
(Scheme, alternative definitions, the first one utilizing memoizing definec-macro)
(definec (A257248 n) (if (= 1 n) 0 (+ (A079559 n) (A257248 (if (zero? (A079559 n)) (A234017 n) (+ -1 (A213714 n)))))))
(define (A257248 n) (- (A256478 n) 1))
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 19 2015
STATUS
approved
a(0) = 1, and for n >= 1, if A079559(n) = 0, then a(n) = 1 + a(A234017(n)), otherwise a(n) = a(A213714(n)-1).
+20
4
1, 1, 2, 1, 2, 3, 2, 1, 2, 3, 3, 2, 4, 3, 2, 1, 2, 3, 3, 3, 4, 4, 2, 4, 3, 3, 2, 5, 4, 3, 2, 1, 2, 3, 3, 3, 4, 4, 3, 4, 4, 4, 2, 5, 5, 3, 4, 3, 5, 3, 2, 4, 4, 5, 4, 3, 3, 2, 6, 5, 4, 3, 2, 1, 2, 3, 3, 3, 4, 4, 3, 4, 4, 4, 3, 5, 5, 4, 4, 4, 5, 4, 2, 5, 5, 5, 5, 3, 3, 4, 6, 6, 4, 5, 3, 5, 4, 3, 2, 6, 4, 4, 4, 3, 5, 4, 5, 5, 6, 3, 3, 5, 2, 6, 4, 4, 5, 4, 3, 3, 2, 7, 6, 5, 4, 3, 2, 1, 2
OFFSET
0,3
COMMENTS
Because A233275(n) = A003188(n) for n = 1 .. 9, a(n) = A005811(n) for n = 1 .. 9.
LINKS
FORMULA
a(0) = 1, and for n >= 1, if A079559(n) = 0, then a(n) = 1 + a(A234017(n)), otherwise a(n) = a(A213714(n)-1).
Other identities. For all n >= 1:
a(n) = A070939(n) - A257248(n).
a(n) = A000120(A233275(n)). [Binary weight of A233275(n).]
a(n) = 1 + A256479(n) = 1 + A080791(A233277(n)).
PROG
(Scheme, alternative definitions, the first one utilizing memoizing definec-macro)
(definec (A257249 n) (if (zero? n) 1 (+ (- 1 (A079559 n)) (A257249 (if (zero? (A079559 n)) (A234017 n) (+ -1 (A213714 n)))))))
(define (A257249 n) (+ 1 (A256479 n)))
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 19 2015
STATUS
approved
Permutation of natural numbers: a(1) = 1; for n > 1, if A079559(n) = 0, a(n) = 2*A234016(n), otherwise a(n) = A003961(a(A213714(n))).
+20
4
1, 2, 3, 5, 4, 6, 7, 9, 8, 15, 11, 10, 12, 14, 25, 27, 16, 35, 13, 18, 20, 21, 45, 22, 33, 49, 24, 26, 28, 30, 125, 81, 32, 77, 17, 34, 36, 75, 63, 38, 55, 175, 40, 42, 44, 39, 65, 46, 121, 135, 48, 50, 51, 99, 52, 105, 343, 54, 56, 58, 60, 62, 625, 243, 64, 143, 19, 66, 68, 57, 225, 70, 245, 275, 72, 74, 76, 69, 91, 78, 539, 189, 80
OFFSET
1,2
COMMENTS
For n > 1, a(n) = the number which is in the same position of array A246278 where n is located in array A256997.
FORMULA
a(1) = 1, for n > 1, if A079559(n) = 0 [when n is a term of A055938], a(n) = 2*A234016(n), otherwise a(n) = A003961(a(A213714(n))).
Other identities:
For all n >= 2, a(n) = A246278(A256998(n)).
PROG
(Scheme)
(definec (A279336 n) (cond ((= 1 n) n) ((zero? (A079559 n)) (* 2 (A234016 n))) (else (A003961 (A279336 (A213714 n))))))
CROSSREFS
Inverse permutation: A279337.
Cf. also A278501, A279338 (a variant).
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 10 2016
STATUS
approved
a(1) = 1, for n > 1, if A079559(n) = 0, a(n) = 2*a(A256992(n)), otherwise a(n) = A250469(a(A256992(n))).
+20
3
1, 2, 3, 5, 4, 6, 7, 9, 10, 15, 11, 8, 12, 14, 25, 27, 18, 35, 13, 20, 30, 21, 33, 22, 39, 49, 16, 24, 28, 50, 65, 51, 54, 77, 17, 36, 70, 57, 87, 26, 55, 85, 40, 60, 42, 63, 95, 66, 121, 45, 44, 78, 69, 81, 98, 147, 119, 32, 48, 56, 100, 130, 125, 159, 102, 143, 19, 108, 154, 105, 207, 34, 145, 215, 72, 140, 114, 75, 91, 174, 133, 117, 52
OFFSET
1,2
FORMULA
a(1) = 1, for n > 1, if A079559(n) = 0 [when n is a term of A055938], a(n) = 2*a(A256992(n)), otherwise a(n) = A250469(a(A256992(n))).
As a composition of other permutations:
a(n) = A250245(A279338(n)).
a(n) = A252753(A279343(n)).
a(n) = A252755(A279341(n)).
PROG
(Scheme) (definec (A279348 n) (cond ((= 1 n) n) ((zero? (A079559 n)) (* 2 (A279348 (A256992 n)))) (else (A250469 (A279348 (A256992 n))))))
CROSSREFS
Inverse: A279349.
Related or similar permutations: A250245, A252753, A252755, A279338, A279341, A279343.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 12 2016
STATUS
approved

Search completed in 0.031 seconds