A319478 a(n) is the least base b > 1 such that the product n * n can be computed without carry by long multiplication.
2, 2, 2, 3, 2, 4, 5, 5, 2, 3, 3, 5, 3, 6, 7, 7, 2, 4, 9, 9, 4, 4, 10, 11, 11, 5, 5, 3, 3, 13, 3, 3, 2, 11, 11, 5, 3, 3, 6, 13, 13, 13, 6, 6, 6, 15, 15, 15, 6, 7, 5, 5, 17, 17, 18, 5, 7, 7, 7, 19, 19, 20, 20, 7, 2, 4, 8, 22, 4, 4, 17, 23, 6, 6, 8, 24, 19, 19, 6
Offset: 0
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..50000 (where the color is function of the initial digit of n in base a(n))
- Index entries for sequences related to carryless arithmetic
Programs
-
Mathematica
Array[Block[{b = 2}, While[AnyTrue[With[{d = IntegerDigits[#, b]}, Function[{s, t}, Total@ Map[PadLeft[#, t] &, s]] @@ {#, Max[Length /@ #]} &@ MapIndexed[Join[d #, ConstantArray[0, First@ #2 - 1]] &, Reverse@ d]], # >= b &], b++]; b] &, 79, 0] (* Michael De Vlieger, Nov 25 2018 *)
-
PARI
a(n) = for (b=2, oo, my (d=if(n==0, [0], digits(n,b))); if (vecmax(d)^2
Comments