A347053 a(n) is the smallest base-10 number greater than 1 such that when written in all bases from base 2 to base n its leading digit is 1.
2, 3, 4, 5, 78125, 67108864, 4747561509943, 4747561509943, 1123100968590805486067490785139871311149300510808491947285143687519677653346191462727898443913171541426176
Offset: 2
Examples
a(2) = 2 as 2 = 10_2, which has 1 as its leading digit. a(3) = 3 as 3 = 11_2 = 10_3, each of which has 1 as its leading digit. a(4) = 4 as 4 = 100_2 = 11_3 = 10_4, each of which has 1 as its leading digit. a(5) = 5 as 5 = 101_2 = 12_3 = 11_4 = 10_5, each of which has 1 as its leading digit. a(6) = 78125 as 78125 = 10011000100101101_2 = 10222011112_3 = 103010231_4 = 10000000_5 = 1401405_6, each of which has 1 as its leading digit. a(7) = 67108864 as 67108864 = 100000000000000000000000000_2 = 11200021111001111_3 = 10000000000000_4 = 114134440424_5 = 10354213104_6 = 1443262444_7, each of which has 1 as its leading digit.
Programs
-
Magma
I:=IntegerToString; N:=17; k:=2; e:=[]; P:=[]; for b in [2..N] do e[b]:=0; P[b]:=1; end for; B:=2; for n in [2..N] do OK:=false; while not OK do OK:=true; for b in [n..2 by -1] do if k ge P[b]*b then j:=Ilog(b, k div P[b]); if j gt 0 then e[b]+:=j; P[b]*:=b^j; end if; end if; if k div P[b] ne 1 then OK:=false; e[b]+:=1; P[b]*:=b; k:=P[b]; B:=b; break; end if; end for; end while; if IsPower(B) then , r:=IsPower(B); E:=Ilog(r,k); else r:=B; E:=e[B]; end if; "a("*I(n)* ") = "*I(r)*"^"*I(E); end for; // _Jon E. Schoenfield, Aug 19 2021
-
Mathematica
Table[r=Range[2,n];k=1;While[FreeQ[w=Union[First/@IntegerDigits[#^k,r]]&/@r,{1}],k++];(First@@Position[w,{1}]+1)^k,{n,2,10}] (* Giorgos Kalogeropoulos, Aug 17 2021 *)
Comments