login
Smallest oblong number that is a repdigit of length > 2 in exactly n bases.
0

%I #15 Jul 18 2019 11:39:38

%S 42,3906,641431602,61035156

%N Smallest oblong number that is a repdigit of length > 2 in exactly n bases.

%e From _Bernard Schott_, Jul 18 2019: (Start)

%e a(1) = 42 = 6*7 = 222_4.

%e a(2) = 3906 = 62*63 = 111111_5 = 666_25.

%e a(3) = 641431602 = 25326*25327 = 999999_37 = (342,342,342)_1469 = (54,54,54)_3446.

%e a(4) = 61035156 = 7812*7813 = 111111111111_5 = 666666_25 = (31,31,31)_125 = (156,156,156)_625. (End)

%o (PARI) /* Functions isoblong, okrepu3 and dge3 after _Michel Marcus_ in A309062 */

%o isoblong(n) = my(m=sqrtint(n)); m*(m+1)==n; \\ A002378

%o okrepu3(b, target, lim) = {my(k = 3, nb = 0, x); while ((x=(b^k-1)/(b-1)) <= target, if (x==target, nb++); k++); nb; }

%o dge3(n) = {my(d=divisors(n), nb=0, ndi, limi); for (i=1, #d, ndi = n/d[i]; limi = sqrtint(ndi); for (k=d[i]+1, limi, nb += okrepu3(k, ndi, limi); ); ); nb; }

%o a(n) = for(k=1, oo, if(isoblong(k), if(dge3(k)==n, return(k))))

%Y Cf. A002378, A326384 (oblongs repdigits of length > 2 in exactly 1 base), A326385 (oblongs repdigits of length > 2 in exactly 2 bases), A309062 (oblongs repdigits of length > 2 in more than 2 bases).

%K nonn,hard,more

%O 1,1

%A _Felix Fröhlich_, Jul 16 2019