A176764
Smallest power of 4 whose decimal expansion contains n.
Original entry on oeis.org
1024, 1, 256, 16384, 4, 256, 16, 1048576, 16384, 4096, 1024, 1099511627776, 1125899906842624, 1180591620717411303424, 262144, 288230376151711744, 16, 17179869184, 1073741824, 4194304, 72057594037927936, 262144, 4722366482869645213696
Offset: 0
a(1) = 1 because 4^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 256 because 4^4 = 256 has "2" as a substring.
a(3) = 16384 because 4^7 = 16384 has "3" as a substring.
-
A176764[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[4^++k], IntegerString[n]]]; 4^k]; Array[A176764, 50, 0] (* Paolo Xausa, Apr 03 2024 *)
A176765
Smallest power of 5 whose decimal expansion contains n.
Original entry on oeis.org
390625, 1, 25, 3125, 48828125, 5, 625, 78125, 78125, 390625, 6103515625, 11920928955078125, 125, 931322574615478515625, 244140625, 15625, 95367431640625, 30517578125, 2384185791015625, 1953125, 1220703125, 116415321826934814453125
Offset: 0
a(1) = 1 because 5^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 25 because 5^2 = 25 has "2" as a substring.
a(3) = 3125 because 5^5 = 3125 has "3" as a substring.
-
A176765[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[5^++k], IntegerString[n]]]; 5^k]; Array[A176765, 50, 0] (* Paolo Xausa, Apr 03 2024 *)
A176767
Smallest power of 7 whose decimal expansion contains n.
Original entry on oeis.org
2401, 1, 2401, 343, 49, 823543, 16807, 7, 16807, 49, 96889010407, 117649, 13841287201, 13841287201, 11398895185373143, 4747561509943, 16807, 117649, 11398895185373143, 1977326743, 13841287201, 3909821048582988049
Offset: 0
a(1) = 1 because 7^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 2401 because 7^4 = 2401 has "2" as a substring.
a(3) = 343 because 7^3 = 343 has "3" as a substring.
-
A176767[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[7^++k], IntegerString[n]]]; 7^k]; Array[A176767, 50, 0] (* Paolo Xausa, Apr 03 2024 *)
A176768
Smallest power of 8 whose decimal expansion contains n.
Original entry on oeis.org
4096, 1, 512, 32768, 64, 512, 64, 32768, 8, 4096, 1073741824, 4398046511104, 512, 134217728, 262144, 2097152, 16777216, 134217728, 1073741824, 68719476736, 2097152, 262144, 2251799813685248, 9223372036854775808, 1073741824
Offset: 0
a(1) = 1 because 8^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 512 because 8^3 = 512 has "2" as a substring.
a(3) = 32768 because 8^5 = 32768 has "3" as a substring.
-
F:= proc(dmax) local R,count,x,N,L,d,i,v;
count:= 0: x:= 1/8: N:= 10^dmax:
while count < N do
x:= 8*x;
L:= convert(x,base,10);
for d from 1 to min(dmax, nops(L)) do
for i from 1 to nops(L)-d+1 do
v:= add(L[j]*10^(j-i),j=i..i+d-1);
if not assigned(R[v]) then count:= count+1; R[v]:= x fi
od od od:
seq(R[v],v=0..N-1);
end proc:
F(2); # Robert Israel, Dec 25 2019
-
A176768[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[8^++k], IntegerString[n]]]; 8^k]; Array[A176768, 50, 0] (* Paolo Xausa, Apr 04 2024 *)
A186774
Smallest power of n whose decimal expansion contains n+1, or 0 if no such number exists.
Original entry on oeis.org
32, 243, 256, 625, 7776, 16807, 4096, 31381059609, 0, 121, 79496847203390844133441536, 51185893014090757, 155568095557812224, 22168378200531005859375, 17592186044416, 118587876497, 11019960576, 42052983462257059
Offset: 2
a(2) = 32 = A030001(3) = smallest power of 2 whose decimal expansion contains 3.
a(3) = 243 = A176763(4) = smallest power of 3 whose decimal expansion contains 4.
-
a:= proc(n) local t, k;
if type(simplify(log[10](n)), integer) then 0
else t:= cat(n+1);
for k from 2 while searchtext(t, cat(n^k))=0
do od; n^k
fi
end:
seq(a(n), n=2..40); # Alois P. Heinz, Feb 26 2011
-
def A186774(n):
if sum(int(d) for d in str(n)) == 1:
return 0
sn, k = str(n+1), 1
while sn not in str(k):
k *= n
return k # Chai Wah Wu, Feb 13 2017
A176766
Smallest power of 6 whose decimal expansion contains n.
Original entry on oeis.org
10077696, 1, 216, 36, 46656, 46656, 6, 7776, 2176782336, 1296, 10077696, 2821109907456, 1296, 13060694016, 6140942214464815497216, 101559956668416, 216, 60466176, 470184984576, 21936950640377856, 170581728179578208256, 216
Offset: 0
a(1) = 1 because 6^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 216 because 6^3 = 216 has "2" as a substring.
a(3) = 36 because 6^2 = 36 has "3" as a substring.
-
A176766[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[6^++k], IntegerString[n]]]; 6^k]; Array[A176766, 50, 0] (* Paolo Xausa, Apr 03 2024 *)
A176769
Smallest power of 9 whose decimal expansion contains n.
Original entry on oeis.org
59049, 1, 729, 531441, 59049, 6561, 6561, 729, 81, 9, 31381059609, 205891132094649, 150094635296999121, 31381059609, 531441, 150094635296999121, 16677181699666569, 1350851717672992089, 2541865828329, 8862938119652501095929
Offset: 0
a(1) = 1 because 9^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 729 because 9^3 = 729 has "2" as a substring.
a(3) = 531441 because 9^6 = 531441 has "3" as a substring.
-
A176769[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[9^++k], IntegerString[n]]]; 9^k]; Array[A176769, 50, 0] (* Paolo Xausa, Apr 04 2024 *)
A176770
Smallest power of 11 whose decimal expansion contains n.
Original entry on oeis.org
161051, 1, 121, 1331, 14641, 161051, 14641, 1771561, 19487171, 19487171, 161051, 11, 121, 1331, 14641, 1771561, 161051, 1771561, 9849732675807611094711841, 19487171, 672749994932560009201, 121, 34522712143931, 2357947691, 25937424601
Offset: 0
a(1) = 1 because 11^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 121 because 11^2 = 121 has "2" as a substring.
a(3) = 1331 because 11^3 = 1331 has "3" as a substring.
-
A176770[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[11^++k], IntegerString[n]]]; 11^k]; Array[A176770, 50, 0] (* Paolo Xausa, Apr 04 2024 *)
A176771
Smallest power of 12 whose decimal expansion contains n.
Original entry on oeis.org
20736, 1, 12, 20736, 144, 2985984, 20736, 1728, 1728, 2985984, 8916100448256, 2218611106740436992, 12, 79496847203390844133441536, 144, 5159780352, 429981696, 1728, 35831808, 61917364224, 20736, 15407021574586368
Offset: 0
a(1) = 1 because 12^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 12 because 12^1 = 12 has "2" as a substring.
a(3) = 20736 because 12^4 = 20736 has "3" as a substring.
-
A176771[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[12^++k], IntegerString[n]]]; 12^k]; Array[A176771, 50, 0] (* Paolo Xausa, Apr 04 2024 *)
A176772
Smallest power of 13 whose decimal expansion contains n.
Original entry on oeis.org
4826809, 1, 2197, 13, 4826809, 28561, 169, 2197, 28561, 169, 10604499373, 51185893014090757, 371293, 13, 51185893014090757, 815730721, 169, 62748517, 137858491849, 2197, 1461920290375446110677, 2197, 23298085122481
Offset: 0
a(1) = 1 because 13^0 = 1 has "1" as a substring (not a proper substring, though).
a(2) = 2197 because 13^3 = 2197 has "2" as a substring.
a(3) = 13 because 13^1 = 13 has "3" as a substring.
-
A176772[n_] := Block[{k = -1}, While[StringFreeQ[IntegerString[13^++k], IntegerString[n]]]; 13^k]; Array[A176772, 50, 0] (* Paolo Xausa, Apr 04 2024 *)
Showing 1-10 of 10 results.
Comments