login
Smallest positive integer whose n-th power contains an equal number of each digit (0-9) when represented in base 10.
9

%I #20 Jun 10 2018 21:11:44

%S 1023456789,32043,2158479,69636,643905,3470187,421359,1472157,320127,

%T 81785058,15763347,31064268,44626422,330096453,85810806,500282265,

%U 2280602382,711974055,2748477954,901992825,3048377607,3322858521,175536645,1427472867

%N Smallest positive integer whose n-th power contains an equal number of each digit (0-9) when represented in base 10.

%e 643905^5 = 110690152879433875483274690625, which contains 3 of each digit 0-9.

%o (PARI) { a(n) = local(k,m,v); k=9; while(1, forstep(m=3*ceil(10^(k/n)/3), floor(10^((k+1)/n)), 3, t=m^n; v=vector(10); while(t, v[(t%10)+1]++; t\=10;); if(vecmin(v)==vecmax(v), return(m); ); ); k+=10) } \\ _Max Alekseyev_, May 20 2009

%K base,nonn

%O 1,1

%A _Jack Brennen_, Sep 17 2002

%E a(10)-a(18) from _Max Alekseyev_, May 20 2009

%E a(19)-a(24) from _Max Alekseyev_, Feb 13 2012