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

A336207 Lexicographically earliest sequence of nonnegative terms such that whenever a(k_1) = ... = a(k_m) with k_1 < ... < k_m, the sum k_1 + ... + k_m can be computed without carries in factorial base.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jul 12 2020

Keywords

Examples

			In factorial base:
- 1 = "1", 2 = "10", 3 = "11", 4 = "20",
- we can add without carry 1 and 2, so a(1) = a(2) = 0,
- 1 + 2 + 3 implies a carry, so a(3) = 1,
- 1 + 2 + 4 and 3 + 4 imply a carry, so a(4) = 2.
		

Crossrefs

See A279125 and A336206 for similar sequences.
Cf. A279732.

Programs

  • C
    See Links section.

Formula

a(n) = 0 iff n belongs to A279732.

A383412 Lexicographically earliest sequence of integers >= 2 such that whenever a(k_1) = ... = a(k_m) with k_1 < ... < k_m, the sum k_1 + ... + k_m can be computed without carries in base a(k_1).

Original entry on oeis.org

2, 2, 2, 3, 2, 3, 4, 5, 2, 3, 5, 6, 6, 7, 7, 8, 2, 4, 9, 9, 4, 7, 9, 10, 8, 5, 5, 3, 11, 12, 5, 10, 2, 10, 11, 11, 3, 12, 12, 12, 13, 13, 6, 13, 13, 14, 14, 14, 15, 7, 15, 15, 16, 16, 16, 17, 14, 17, 18, 18, 15, 18, 19, 19, 2, 20, 20, 20, 4, 17, 17, 21, 6, 18
Offset: 0

Views

Author

Rémy Sigrist, Apr 26 2025

Keywords

Comments

This sequence is a variant of A279125 and A336206 exploiting several bases.
This sequence is unbounded:
- by contradiction, suppose that a(n) <= B for some B >= 2,
- let U_B = {1 + B!*k, k >= 0},
- the base b expansion of any term of U_B ends with a digit 1 in any base b in the interval 2..B,
- by the pigeonhole principle, for some b in the interval 2..B, we have a(u) = b for infinitely many terms of U_B,
- however we can at most add b-1 such terms in base b, a contradiction.

Examples

			The first terms, in decimal and in base a(n), alongside the corresponding sums of indices k <= n such that a(k) = a(n) in base a(n), are:
  n   a(n)  n in base a(n)  Sums in base a(n)
  --  ----  --------------  -----------------
   0     2  0               0
   1     2  1               1
   2     2  1,0             1,1
   3     3  1,0             1,0
   4     2  1,0,0           1,1,1
   5     3  1,2             2,2
   6     4  1,2             1,2
   7     5  1,2             1,2
   8     2  1,0,0,0         1,1,1,1
   9     3  1,0,0           1,2,2
  10     5  2,0             3,2
  11     6  1,5             1,5
  12     6  2,0             3,5
  13     7  1,6             1,6
  14     7  2,0             3,6
  15     8  1,7             1,7
		

Crossrefs

Programs

  • PARI
    {   t = [0, 0];
        for (n = 0, 73,
            for (b = 2, oo,
                if (#t < b,
                    t = concat(t, vector(#t)););
                if (sumdigits(t[b]+n, b) == sumdigits(t[b], b) + sumdigits(n, b),
                    print1 (b", "); t[b] += n; break;););); }

Formula

a(n) = 2 iff n belongs to A131577.
Showing 1-2 of 2 results.