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-5 of 5 results.

A328653 a(0) = 1, and for n >= 0, a(n+1) = -A326936(a(n)).

Original entry on oeis.org

1, 3, 7, 18, 35, 84, 222, 459, 1186, 2099, 4731, 8093, 19674, 49289, 102408, 242522, 659653
Offset: 0

Views

Author

Rémy Sigrist, Oct 24 2019

Keywords

Comments

This sequence gives the values of the ancestors of the node with value 1 in the binary tree described in sequence A326936.

Crossrefs

Cf. A326936.

A361144 Lexicographically earliest sequence of positive integers such that the sums Sum_{i = 1+k*2^e..(k+1)*2^e} a(i) with k, e >= 0 are all distinct.

Original entry on oeis.org

1, 2, 4, 5, 6, 7, 8, 10, 11, 14, 15, 17, 16, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 33, 34, 36, 37, 38, 39, 40, 42, 44, 46, 47, 49, 48, 51, 52, 53, 54, 56, 58, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 74, 75, 78, 79, 81, 80, 83, 84, 85, 86, 87, 88
Offset: 1

Views

Author

Rémy Sigrist, Mar 02 2023

Keywords

Comments

In other words, a(1), a(2), a(1)+a(2), a(3), a(4), a(3)+a(4), a(1)+a(2)+a(3)+a(4), a(5), a(6), a(5)+a(6), etc. are all distinct (see A361227 for these values).
In particular, all terms are distinct (but not necessarily in increasing order).
We can arrange the terms of the sequence as the leaves of a perfect infinite binary tree, the sums with e > 0 corresponding to parent nodes; each node will contain a different value and all values will appear in the tree (if n = 2^m+1 for some m > 0, then a(n) will equal the least missing value so far in the tree).

Examples

			The first terms (at the bottom of the tree) alongside the corresponding sums are:
                                176
                 ---------------------------------
                43                              133
         -----------------               -----------------
        12              31              57              76
     ---------       ---------       ---------       ---------
     3       9      13      18      25      32      35      41
   -----   -----   -----   -----   -----   -----   -----   -----
   1   2   4   5   6   7   8  10  11  14  15  17  16  19  20  21
		

Crossrefs

See A360305, A361189, A361191 and A361234 for other variants.

Programs

  • PARI
    See Links section.
    (C++) See Links section.

Formula

Empirically, a(n) ~ 4*n/3 as n tends to infinity.

A328654 Consider an empty list L, and for k = 1, 2, ...: if L contains a pair of consecutive terms summing to k, then let (u, v) be the first such pair: replace the two terms u and v in L with a single term k and set a(u) = v and a(v) = u, otherwise append k to L.

Original entry on oeis.org

2, 1, 4, 3, 6, 5, 11, 9, 8, 12, 7, 10, 14, 13, 16, 15, 18, 17, 20, 19, 23, 27, 21, 44, 26, 25, 22, 29, 28, 32, 39, 30, 34, 33, 49, 37, 36, 40, 31, 38, 42, 41, 45, 24, 43, 47, 46, 50, 35, 48, 57, 53, 52, 55, 54, 58, 51, 56, 60, 59, 63, 67, 61, 124, 66, 65, 62
Offset: 1

Views

Author

Rémy Sigrist, Oct 24 2019

Keywords

Comments

For any n > 0, a(n) is the value of the sibling of the node with value n in the binary tree described in A326936.
This sequence is a self-inverse permutation of the positive integers.

Examples

			For n = 1:
- we set L = (1).
For n = 2:
- we set L = (1, 2).
For k = 3:
- the first two terms, (1, 2), sum to 3,
- so a(1) = 2 and a(2) = 1,
- we set L = (3).
		

Crossrefs

Cf. A326936.

Formula

A326936(n) + A326936(a(n)) = 0.

A338763 Let L_1 = (1, 2, ...); for any n > 0, let M_n = Min_{k > 0} L_n(k) + L_n(k+1) and K_n = Min_{ k | L_n(k) + L_n(k+1) = M_n }, L_{n+1} is obtained by replacing the two terms L_n(K_n) and L_n(K_n+1) by M_n in L_n; a(n) = M_n.

Original entry on oeis.org

3, 6, 9, 13, 15, 17, 21, 25, 28, 29, 33, 37, 38, 41, 45, 49, 53, 54, 57, 61, 65, 66, 69, 70, 73, 77, 81, 85, 86, 89, 93, 97, 101, 102, 105, 109, 113, 117, 118, 120, 121, 125, 129, 133, 134, 137, 141, 145, 149, 150, 153, 156, 157, 161, 165, 166, 169, 173, 177
Offset: 1

Views

Author

Rémy Sigrist, Nov 07 2020

Keywords

Comments

In other words, we start with the natural numbers and repeatedly replace the leftmost pair of consecutive terms with minimal sum by its sum; a(n) corresponds to the sum at n-th step.
This sequence is weakly increasing, and tends to infinity (as for any m > 0, there are only finitely many runs of two or more consecutive integers with a sum < m).

Examples

			The first terms, alongside L_n, are:
  n   a(n)  L_n
  --  ----  ----------------------------------------------------------
   1     3  { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }
   2     6  {   3,  3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }
   3     9  {      6,  4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }
   4    13  {      6,    9,  6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }
   5    15  {      6,    9,   13,  8, 9, 10, 11, 12, 13, 14, 15, ... }
   6    17  {         15,     13,  8, 9, 10, 11, 12, 13, 14, 15, ... }
   7    21  {         15,     13,   17,  10, 11, 12, 13, 14, 15, ... }
   8    25  {         15,     13,   17,    21,   12, 13, 14, 15, ... }
   9    28  {         15,     13,   17,    21,     25,   14, 15, ... }
  10    29  {             28,       17,    21,     25,   14, 15, ... }
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) <= a(n+1).

A338764 Let L_1 = (1, 2, ...); for any n > 0, let M_n = Min_{k > 0} L_n(k) + L_n(k+1) and K_n = Min_{ k | L_n(k) + L_n(k+1) = M_n }, L_{n+1} is obtained by replacing the two terms L_n(K_n) and L_n(K_n+1) by M_n in L_n; a(n) = K_n.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Nov 07 2020

Keywords

Comments

In other words, we start with the natural numbers and repeatedly replace the leftmost pair of consecutive terms with minimal sum by its sum; a(n) corresponds to the position of the pair substituted at n-th step.

Examples

			The first terms, alongside L_n, are:
  n   a(n)  L_n
  --  ----  ----------------------------------------------------------
   1     1  { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }
   2     1  {   3,  3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }
   3     2  {      6,  4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }
   4     3  {      6,    9,  6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ... }
   5     1  {      6,    9,   13,  8, 9, 10, 11, 12, 13, 14, 15, ... }
   6     3  {         15,     13,  8, 9, 10, 11, 12, 13, 14, 15, ... }
   7     4  {         15,     13,   17,  10, 11, 12, 13, 14, 15, ... }
   8     5  {         15,     13,   17,    21,   12, 13, 14, 15, ... }
   9     1  {         15,     13,   17,    21,     25,   14, 15, ... }
  10     5  {             28,       17,    21,     25,   14, 15, ... }
		

Crossrefs

Programs

  • PARI
    See Links section.
Showing 1-5 of 5 results.