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).
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
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
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..10000
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.
Comments