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 A374735 #16 Jul 19 2024 18:18:55 %S A374735 1,1,1,1,1,2,2,3,5,10,1,1,1,1,1,2,2,3,10,20,1,1,1,1,1,2,2,6,5,30,1,1, %T A374735 1,1,1,4,7,3,20,40,1,1,1,1,1,10,5,3,5,50,2,2,2,2,6,2,2,6,30,60,2,2,2, %U A374735 2,5,2,2,3,15,70,3,3,3,7,3,4,12,13,40,80,5,5 %N A374735 a(n) is the least k > 0 such that n and k*n can be added without carries in decimal. %H A374735 Rémy Sigrist, <a href="/A374735/b374735.txt">Table of n, a(n) for n = 0..10000</a> %F A374735 a(n) = 1 iff n belongs to A007091. %F A374735 a(10*n) = a(n). %e A374735 For n = 8: %e A374735 - 1*8 = 8; computing 8 + 8 requires a carry, %e A374735 - 2*8 = 16; computing 8 + 16 requires a carry, %e A374735 - 3*8 = 24; computing 8 + 24 requires a carry, %e A374735 - 4*8 = 32; computing 8 + 32 requires a carry, %e A374735 - 5*8 = 40; computing 8 + 40 does not require a carry, %e A374735 - so a(8) = 5. %o A374735 (PARI) a(n, base = 10) = { for (k = 1, oo, if (sumdigits((k+1)*n, base) == sumdigits(n, base) + sumdigits(k*n, base), return (k););); } %o A374735 (Python) %o A374735 from itertools import count %o A374735 def A374735(n): %o A374735 s = list(map(int,str(n)[::-1])) %o A374735 return next(k for k in count(1) if all(a+b<=9 for a, b in zip(s,map(int,str(k*n)[::-1])))) # _Chai Wah Wu_, Jul 19 2024 %Y A374735 Cf. A007091, A261891 (analog for binary), A353623 (analog for balanced ternary), A374736. %K A374735 nonn,base,easy %O A374735 0,6 %A A374735 _Rémy Sigrist_, Jul 18 2024