cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A253554 a(1) = 1, a(2n) = n, a(2n+1) = A250470(2n+1).

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 4, 4, 5, 7, 6, 11, 7, 6, 8, 13, 9, 17, 10, 8, 11, 19, 12, 9, 13, 10, 14, 23, 15, 29, 16, 12, 17, 15, 18, 31, 19, 14, 20, 37, 21, 41, 22, 16, 23, 43, 24, 25, 25, 18, 26, 47, 27, 21, 28, 20, 29, 53, 30, 59, 31, 22, 32, 27, 33, 61, 34, 24, 35, 67, 36, 71, 37, 26, 38, 35, 39, 73, 40, 28, 41, 79, 42, 33, 43, 30
Offset: 1

Views

Author

Antti Karttunen, Jan 12 2015

Keywords

Comments

Divide the even numbers by two, and for odd numbers n >= 3, a(n) = A078898(n)-th number k for which A055396(k) = A055396(n)-1.
For any number n >= 2 in binary trees A252753 and A252755, a(n) gives the number which is the parent of n.

Crossrefs

Bisections: A000027 and A250472.
Cf. A253555 (the number of iterations needed to reach 1 from n).
Differs from A252463 for the first time at n=21, where a(21) = 8, while A252463(21) = 10.

Programs

  • Scheme
    (define (A253554 n) (cond ((<= n 1) n) ((even? n) (/ n 2)) (else (A250470 n))))

Formula

a(1) = 1, a(2n) = n, a(2n+1) = A250470(2n+1).