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.

Showing 1-6 of 6 results.

A268677 Complement of A268678; numbers that do not occur in A268395.

Original entry on oeis.org

2, 6, 9, 10, 12, 13, 14, 17, 21, 24, 25, 28, 29, 30, 33, 35, 38, 39, 43, 44, 45, 46, 49, 51, 54, 55, 58, 61, 62, 63, 67, 68, 71, 73, 76, 77, 78, 79, 80, 84, 85, 88, 91, 94, 95, 96, 97, 99, 100, 103, 107, 110, 111, 112, 114, 115, 118, 122, 125, 126, 128, 129, 130, 133, 137, 140, 141, 143, 144, 145, 146, 149, 152
Offset: 1

Views

Author

Antti Karttunen, Feb 10 2016

Keywords

Crossrefs

Cf. A268712.
Cf. also A096346.

Programs

  • Mathematica
    f[n_] := Which[n == 1, 0, OddQ@ #, 0, EvenQ@ #, 1 + f[#/2]] &@ Fold[BitXor, n, Quotient[n, 2^Range[BitLength@ n - 1]]]; Complement[Range@ #, Union@ Accumulate@ Array[f, {#}]] &@ 152 (* Michael De Vlieger, Feb 12 2016, after Jan Mangaldan at A006068 *)

A268680 Least monotonic left inverse of A268678.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 11 2016

Keywords

Comments

a(n) = number of distinct nonzero values A268395 that occur in range [0 .. n].
Each n occurs A268679(n+1) times.

Crossrefs

Cf. also A268711.

Formula

Other identities. For all n >= 0:
a(A268678(n)) = n.

A268712 Permutation of natural numbers: a(1) = 1, a(2n) = A268677(a(n)), a(2n+1) = A268678(1+a(n)).

Original entry on oeis.org

1, 2, 3, 6, 4, 9, 5, 13, 11, 10, 7, 21, 18, 12, 8, 29, 23, 25, 20, 24, 19, 14, 15, 45, 40, 39, 34, 28, 22, 17, 16, 62, 56, 49, 42, 54, 48, 44, 37, 51, 47, 43, 36, 30, 26, 33, 27, 95, 87, 84, 75, 80, 74, 73, 65, 61, 53, 46, 41, 38, 32, 35, 31, 129, 120, 115, 108, 100, 93, 88, 82, 112, 105, 99, 92, 94, 86, 78, 70
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2016

Keywords

Comments

This sequence can be represented as a binary tree. Each left hand child is produced as A268677(n), and each right hand child as A268678(1+n), when the parent node contains n:
|
...................1...................
2 3
6......../ \........4 9......../ \........5
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
13 11 10 7 21 18 12 8
29 23 25 20 24 19 14 15 45 40 39 34 28 22 17 16
etc.

Crossrefs

Inverse: A268711.

Formula

a(1) = 1, after which: a(2n) = A268677(a(n)), a(2n+1) = A268678(1+a(n)).

A268711 Permutation of natural numbers: a(1) = 1, a(A268677(n)) = 2*a(n), a(A268678(n+1)) = 1+(2*a(n)).

Original entry on oeis.org

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
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2016

Keywords

Crossrefs

Inverse: A268712.

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).

A268395 Partial sums of A268389.

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 4, 4, 4, 5, 7, 7, 8, 8, 8, 11, 11, 15, 16, 16, 18, 18, 18, 19, 20, 20, 20, 22, 22, 23, 26, 26, 26, 27, 31, 31, 32, 32, 32, 34, 36, 36, 36, 37, 37, 40, 41, 41, 42, 42, 42, 47, 47, 48, 50, 50, 50, 52, 53, 53, 56, 56, 56, 57, 57, 59, 60, 60, 64, 64, 64, 65, 66, 66, 66, 69, 69, 70, 72, 72, 74, 74, 74, 75, 75, 81
Offset: 0

Views

Author

Antti Karttunen, Feb 10 2016

Keywords

Crossrefs

Cf. A268678 (with duplicates removed), A268677 (numbers that do not occur here).
Cf. also A054861.

Programs

  • Mathematica
    f[n_] := Which[n == 1, 0, OddQ@ #, 0, EvenQ@ #, 1 + f[#/2]] &@ Fold[BitXor, n, Quotient[n, 2^Range[BitLength@ n - 1]]]; Accumulate@ Array[f, {85}] (* Michael De Vlieger, Feb 12 2016, after Jan Mangaldan at A006068 *)

Formula

a(0) = 0, for n >= 1, a(n) = A268389(n) + a(n-1).
Other identities. For all n >= 0:
a(n) = A268389(A048631(n)).
a(n) = n - A268672(n).

A268679 a(n) = A268389(A001969(1+n)); A268389 without its zero terms.

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 3, 4, 1, 2, 1, 1, 2, 1, 3, 1, 4, 1, 2, 2, 1, 3, 1, 1, 5, 1, 2, 2, 1, 3, 1, 2, 1, 4, 1, 1, 3, 1, 2, 2, 1, 6, 1, 1, 3, 1, 2, 1, 2, 1, 5, 3, 1, 2, 1, 1, 2, 1, 4, 3, 1, 2, 1, 1, 2, 1, 3, 4, 1, 2, 1, 1, 2, 1, 3, 5, 1, 2, 1, 2, 1, 3, 1, 1, 6, 1, 2, 2, 1, 3, 1, 1, 4, 1, 2, 1, 3, 1, 2, 2, 1, 5, 1, 1, 3, 1, 2, 2, 1, 4, 1, 3, 1, 2, 1, 1, 2, 1, 4, 3
Offset: 1

Views

Author

Antti Karttunen, Feb 10 2016

Keywords

Crossrefs

Cf. A268678 (partial sums), A268680.

Programs

Formula

a(n) = A268389(A001969(1+n)).
Showing 1-6 of 6 results.