login
A285448
Least number x such that x^n has n digits equal to k. Case k = 1.
2
1, 11, 58, 59, 171, 521, 391, 163, 1023, 1271, 1711, 4051, 1603, 3679, 9639, 3019, 13442, 5469, 14301, 17931, 24871, 31857, 20161, 24091, 33245, 33259, 35561, 36411, 30817, 110343, 51488, 52504, 37141, 77044, 105722, 138088, 61085, 83707, 127258, 85163, 38001, 148285
OFFSET
1,2
LINKS
EXAMPLE
a(4) = 59 because 59^4 = 12117361 has 4 digits '1' and is the least number to have this property.
MAPLE
P:=proc(q, h) local a, j, k, n, t; for n from 1 to q do for k from 1 to q do
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;
if t=n then print(k); break; fi; od; od; end: P(10^9, 1);
PROG
(PARI) A285448vec=(n, {k=1})->{my(L:list, c); L=List(); for(t=1, n, forstep(y=1, +oo, 1, c=digits(y^t); if(sum(j=1, #c, c[j]==k)==t, listput(L, y); break()))); return(Vec(L))} \\ R. J. Cano, Apr 29 2017
KEYWORD
base,nonn,easy
AUTHOR
Paolo P. Lava, Apr 19 2017
STATUS
approved