login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A319478 a(n) is the least base b > 1 such that the product n * n can be computed without carry by long multiplication. 3

%I #44 Dec 01 2018 04:54:00

%S 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,

%T 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,

%U 19,20,20,7,2,4,8,22,4,4,17,23,6,6,8,24,19,19,6

%N a(n) is the least base b > 1 such that the product n * n can be computed without carry by long multiplication.

%C Apparently, a(n) is also the least base b > 1 where the square of the digital sum of n equals the digital sum of the square of n.

%C The sequence is well defined as, for any n > 0, n * n can be computed without carry in base n^2 + 1.

%H Rémy Sigrist, <a href="/A319478/b319478.txt">Table of n, a(n) for n = 0..10000</a>

%H Rémy Sigrist, <a href="/A319478/a319478.png">Colored scatterplot of (n, a(n)) for n = 0..50000</a> (where the color is function of the initial digit of n in base a(n))

%H <a href="/index/Ca#CARRYLESS">Index entries for sequences related to carryless arithmetic</a>

%F a(n) = 2 iff n belongs to A131577.

%F a(n * a(n)) <= a(n).

%F a(A061909(n)) <= 10 for any n > 0.

%t 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 *)

%o (PARI) a(n) = for (b=2, oo, my (d=if(n==0, [0], digits(n,b))); if (vecmax(d)^2<b, my (s=0, ok=1); forstep (i=#d, 1, -1, s \= b; my (t=d[i]*n); if (sumdigits(s+t,b)==sumdigits(s,b)+sumdigits(t,b), s += t, ok = 0; break)); if (ok, return (b))))

%Y See A321882 for the additive variant.

%Y Cf. A061909, A131577.

%K nonn,base

%O 0,1

%A _Rémy Sigrist_, Nov 21 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)