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.
%I A321882 #22 Dec 01 2018 04:54:29 %S A321882 2,3,5,3,3,4,5,5,6,3,3,5,3,3,6,7,4,4,8,8,4,4,7,7,7,5,5,3,3,9,3,3,5,10, %T A321882 10,5,3,3,6,3,3,10,6,6,6,11,11,11,6,6,5,5,5,12,13,5,5,5,7,7,5,5,5,7,4, %U A321882 4,7,8,4,4,7,7,6,6,6,8,14,15,6,6,4,3,3,8 %N A321882 a(n) is the least base b > 1 such that the sum n + n can be computed without carry. %C A321882 Equivalently, a(n) is the least base b > 1 where: %C A321882 - twice the greatest digit of n is < b, %C A321882 - twice the digital sum of n equals the digital sum of twice n. %C A321882 The sequence is well defined as, for any n > 0, n + n can be computed without carry in base 2*n + 1. %C A321882 The sequence is unbounded; by contradiction: %C A321882 - suppose that v = a(n) is the greatest term of the sequence, %C A321882 - we can assume that v > 2, %C A321882 - let d be the greatest digit of v!^A000120(n) in base v, %C A321882 - let k = floor((v-1) / d), %C A321882 - necessarily a(n + k * (v!^A000120(n))) > v, QED. %H A321882 Rémy Sigrist, <a href="/A321882/b321882.txt">Table of n, a(n) for n = 0..10000</a> %H A321882 Rémy Sigrist, <a href="/A321882/a321882.png">Colored scatterplot of (n, a(n)) for n = 0..10000000</a> (where the color is function of the initial digit of n in base a(n)) %H A321882 <a href="/index/Ca#CARRYLESS">Index entries for sequences related to carryless arithmetic</a> %F A321882 a(n) = 2 iff n = 0. %F A321882 a(n) = 3 iff n > 0 and n belongs to A005836. %F A321882 a(n * a(n)) <= a(n). %F A321882 a(A007091(n)) <= 10 for any n >= 0. %e A321882 For n = 42: %e A321882 - in base 2, 42 + 42 cannot be computed without carry: "101010" + "101010" = "1010100", %e A321882 - in base 3, 42 + 42 cannot be computed without carry: "1120" + "1120" = "10010", %e A321882 - in base 4, 42 + 42 cannot be computed without carry: "222" + "222" = "1110", %e A321882 - in base 5, 42 + 42 cannot be computed without carry: "132" + "132" = "314", %e A321882 - in base 6, 42 + 42 can be computed without carry: "110" + "110" = "220", %e A321882 - hence a(42) = 6. %t A321882 Array[Block[{b = 2}, While[2 Max@ IntegerDigits[#, b] >= b, b++]; b] &, 84, 0] (* _Michael De Vlieger_, Nov 25 2018 *) %o A321882 (PARI) a(n) = for (b=2, oo, if (2*sumdigits(n, b)==sumdigits(n*2, b), return (b))) %Y A321882 See A319478 for the multiplicative variant. %Y A321882 Cf. A005836, A007091. %K A321882 nonn,base %O A321882 0,1 %A A321882 _Rémy Sigrist_, Nov 20 2018