A154566
Smallest 10-digit number whose n-th power contains each digit (0-9) n times, or -1 if no such number exists.
Original entry on oeis.org
1023456789, 3164252736, 4642110594, 5623720662, 6312942339, 6813614229, 7197035958, 7513755246, 7747685775, 7961085846, 8120306331, 8275283289, 8393900487, 8626922994, 8594070624, 8691229761, 8800389678, 8807854905, 9873773268, 8951993472, 9473643936, 9585032094
Offset: 1
For n=18, a(n)=8807854905. That means 8807854905^18 has all digits 0-9 each 18 times and 8807854905 is the smallest 10-digit number which has this property.
-
def flag(p, n):
for i in range(10):
if not p.count(str(i)) == n:
return False
return True
def a(n):
for i in range(3*int(10**(10-1/n)/3), 10**10, 3):
if flag(str(i**n), n):
return i
for i in range(1, 41):
print(a(i), end=", ") # Zhining Yang, Oct 05 2022
-
Function Flag(ByVal s As String, ByVal num As Long) As Long
Dim b&(9), t&, i&
Flag = 1
If Len(s) <> 10 * num Then
Flag = 0
Exit Function
End If
For i = 1 To Len(s)
t = Val(Mid(s, i, 1))
b(t) = b(t) + 1
If b(t) > num Then
Flag = 0
Exit Function
End If
Next
End Function
'
Function Mypower(ByVal num As Currency, ByVal power As Long) As String
Dim b(), temp, i&, j&
ReDim b(1 To 2 * power)
ReDim s(1 To 2 * power)
b(2 * power - 1) = Val(Left(num, 5))
b(2 * power) = Val(Right(num, 5))
For i = 2 To power
temp = 0
For j = 2 * power To 1 Step -1
temp = b(j) * num + temp
b(j) = Format(Val(Right(temp, 5)), "00000")
temp = Int(temp / 10 ^ 5)
Next
Next
Mypower = Join(b, "")
End Function
'
Function a(ByVal n As Long)
Dim j As Currency, s As String, num&
For j = 3 * Int(1 + 10 ^ (10 - 1 / n) / 3) To 9999999999# Step 3
DoEvents
If Flag(Mypower(j, n), n) = 1 Then
a = j
Exit Function
End If
Next
End Function ' Zhining Yang, Oct 11 2022
A154871
Numbers n such that n^6 contains every digit exactly 4 times.
Original entry on oeis.org
3470187, 3554463, 3887058, 4328241, 4497738
Offset: 1
3887058^6=3449261536602702380309782557611971988544, which contains 4 times of each digit 0-9. Total 5 terms
A154873
Numbers n such that n^5 contains every digit exactly 3 times.
Original entry on oeis.org
643905, 680061, 720558, 775113, 840501, 878613, 984927
Offset: 1
840501^5=419460598737334268928156702501, which contains exactly 3 times of each digit 0-9. Total 7 terms
A154874
Numbers k such that k^3 contains every digit exactly twice.
Original entry on oeis.org
2158479, 2190762, 2205528, 2219322, 2301615, 2330397, 2336268, 2345811, 2358828, 2359026, 2367609, 2388534, 2389119, 2389638, 2397132, 2428986, 2504736, 2524974, 2536152, 2583258, 2590125, 2607222, 2620827, 2622012, 2647866, 2649369, 2658636, 2671593
Offset: 1
2358828^3 = 13124683009764879552, which contains each digit 0..9 exactly twice.
-
lim:=floor((10^20)^(1/3)): for j from ceil((10^19)^(1/3)) to lim do d:=convert(j^3,base,10): doubdig:=true: for k from 0 to 9 do if(numboccur(d,k)<>2)then doubdig:=false:break: fi: od: if(doubdig)then print(j); fi: od: # Nathaniel Johnston, May 28 2011
-
With[{cmin=Ceiling[Surd[10^19,3]],cmax=Floor[Surd[10^20,3]]},Select[ Range[ cmin, cmax], Union[ DigitCount[#^3]]=={2}&]] (* Harvey P. Dale, Nov 17 2018 *)
A154818
Numbers k such that k^4 contains every digit exactly twice.
Original entry on oeis.org
69636, 70215, 77058, 80892
Offset: 1
A357755
Number of solutions for a 10-digit number whose n-th power contains each digit (0-9) exactly n times.
Original entry on oeis.org
3265920, 468372, 65663, 15487, 5020, 1930, 855, 417, 246, 114, 97, 45, 33, 24, 20, 18, 7, 6, 1, 3, 2, 3, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1
Offset: 1
a(20) = 3 because there are 3 10-digit numbers (8951993472, 9921107394, and 9985819785) whose 20th power contains each digit (0-9) 20 times.
-
def flag(p, n):
return all(p.count(d) == n for d in "0123456789")
def a(n):
num=0
for i in range(10**10-1, 3*int(10**(10-1/n)/3), -3):
if flag(str(i**n), n):
num+=1
return(num)
A154875
Numbers k such that k^4 contains every digit exactly 3 times.
Original entry on oeis.org
17824719, 17940018, 18027474, 18197931, 18326025, 18798396, 18915888, 18929424, 19027455, 19149462, 19180275, 19196064, 19235673, 19311297, 19322913, 19324275, 19328322, 19455918, 19522575, 19757886, 19793664
Offset: 1
22807116 ^ 4 = 270571148920443982076865351936, which contains exactly 3 times of each digit 0-9.
-
Select[Range[17824000,31608000],Union[Tally[IntegerDigits[#^4]][[All,2]]]=={3}&] (* Harvey P. Dale, Dec 24 2016 *)
-
is(n) = my(v=vector(10), d=digits(n^4)); if(#d!=30,return(0)); for(i=1, #d, v[d[i]+1]++; if(v[d[i]+1] > 3, return(0))); 1 \\ David A. Corneth, Aug 19 2025
A370667
Largest pandigital number whose n-th power contains each digit (0-9) exactly n times.
Original entry on oeis.org
9876543210, 9876124053, 9863527104, 9846032571, 9847103256, 9247560381
Offset: 1
a(4) = 9846032571 because it is the largest 10-digit number that contains each digit (0-9) exactly once and its 4th power 9398208429603554221689707364750715341681 contains each digit (0-9) exactly 4 times.
-
s=FromDigits/@Permutations[Range[0,9]];For[n=1,n<=6,n++,For[k=Length@s,k>0,k--,If[Count[Tally[IntegerDigits[s[[k]]^n]][[All,2]],n]==10,Print[{n,s[[k]]}];Break[]]]]
-
from itertools import permutations
a=[]
for n in range(1,7):
for k in [int(''.join(d)) for d in permutations('9876543210', 10)]:
if all(str(k**n).count(d) ==n for d in '0123456789'):
a.append(k)
break
print(a)
A154876
10-digit numbers n such that n^16 contains every digit exactly 16 times.
Original entry on oeis.org
8691229761, 8776040742, 8800099059, 8812428855, 8813522223, 8815323864, 8823675177, 8886940968, 9239038038, 9324907263, 9480130515, 9500938647, 9643844169, 9801034758, 9857840688, 9872688021, 9962545842, 9970902252
Offset: 1
8691229761^16=1059984945135973085116625441940958734567890938937942910046410302827750560860737374626331724228885721853160790705924439371252226476405367618058329962361885148161 means that 16th power of 8691229761 has all digit(0-9) each for 16 times exactly
A371469
Least pandigital number whose n-th power contains each digit (0-9) exactly n times.
Original entry on oeis.org
1023456789, 3175462089, 4680215379, 5702631489, 7351062489, 7025869314
Offset: 1
a(4) = 5702631489 because it is the least 10-digit number that contains each digit (0-9) exactly once and its 4th power 1057550783692741389295697108242363408641 contains each digit (0-9) exactly 4 times.
Cf.
A050278,
A199630,
A199631,
A199632,
A199633,
A078255,
A154532,
A154566,
A357755,
A365144,
A370667.
-
s = FromDigits /@ Permutations[Range[0, 9]]; For[n = 1, n < 7, n++,
For[k = 1, k <= Length@s, k++,
If[Count[Tally[IntegerDigits[s[[k]]^n]][[All, 2]], n] == 10,
Print[{n, s[[k]]}]; Break[]]]]
-
from itertools import permutations as per
a=[]
for n in range(1,7):
for k in [int(''.join(d)) for d in per('0123456789', 10)]:
if all(str(k**n).count(d) ==n for d in '0123456789'):
a.append(k)
break
print(a)
Showing 1-10 of 10 results.
Comments