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.

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.