login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Least number x such that x^n has n digits equal to k. Case k = 6.
6

%I #15 May 12 2017 14:33:38

%S 6,26,36,174,561,426,616,711,341,2389,2226,4968,8136,2605,10838,11396,

%T 12299,11877,6398,13862,8906,12551,43196,33104,51241,43955,52492,

%U 19718,47985,45903,78017,78862,34572,65196,79768,109223,39291,139583,151046,174124,195761

%N Least number x such that x^n has n digits equal to k. Case k = 6.

%H Martin Gossow, <a href="/A285453/b285453.txt">Table of n, a(n) for n = 1..100</a>

%e a(4) = 174 because 174^4 = 916636176 has 4 digits '6' and is the least number to have this property.

%p P:=proc(q,h) local a,j,k,n,t; for n from 1 to q do for k from 1 to q do

%p a:=convert(k^n,base,10); t:=0; for j from 1 to nops(a) do if a[j]=h then t:=t+1; fi; od;

%p if t=n then print(k); break; fi; od; od; end: P(10^9,6);

%t With[{k = 6}, Table[x = 1; While[DigitCount[x^n, 10, k] != n, x++]; x, {n, 41}]] (* _Michael De Vlieger_, May 01 2017 *)

%K nonn,base,easy

%O 1,1

%A _Paolo P. Lava_, Apr 19 2017