OFFSET
0,1
COMMENTS
Equivalently, a(n) is the least base b > 1 where:
- twice the greatest digit of n is < b,
- twice the digital sum of n equals the digital sum of twice n.
The sequence is well defined as, for any n > 0, n + n can be computed without carry in base 2*n + 1.
The sequence is unbounded; by contradiction:
- suppose that v = a(n) is the greatest term of the sequence,
- we can assume that v > 2,
- let d be the greatest digit of v!^A000120(n) in base v,
- let k = floor((v-1) / d),
- necessarily a(n + k * (v!^A000120(n))) > v, QED.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
Rémy Sigrist, Colored scatterplot of (n, a(n)) for n = 0..10000000 (where the color is function of the initial digit of n in base a(n))
FORMULA
EXAMPLE
For n = 42:
- in base 2, 42 + 42 cannot be computed without carry: "101010" + "101010" = "1010100",
- in base 3, 42 + 42 cannot be computed without carry: "1120" + "1120" = "10010",
- in base 4, 42 + 42 cannot be computed without carry: "222" + "222" = "1110",
- in base 5, 42 + 42 cannot be computed without carry: "132" + "132" = "314",
- in base 6, 42 + 42 can be computed without carry: "110" + "110" = "220",
- hence a(42) = 6.
MATHEMATICA
Array[Block[{b = 2}, While[2 Max@ IntegerDigits[#, b] >= b, b++]; b] &, 84, 0] (* Michael De Vlieger, Nov 25 2018 *)
PROG
(PARI) a(n) = for (b=2, oo, if (2*sumdigits(n, b)==sumdigits(n*2, b), return (b)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 20 2018
STATUS
approved