|
|
A285451
|
|
Least number x such that x^n has n digits equal to k. Case k=4.
|
|
3
|
|
|
4, 12, 114, 261, 384, 258, 896, 1491, 1739, 2768, 3241, 3974, 1114, 4522, 9368, 5144, 1935, 11982, 8461, 19038, 13692, 25173, 16484, 37477, 21003, 26216, 46587, 42619, 29054, 74082, 41952, 42202, 89028, 55008, 89509, 94607, 152995, 117981, 137012, 157011, 95466
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 261 because 261^4 = 4640470641 has 4 digits '4' 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, 4);
|
|
MATHEMATICA
|
With[{k = 4}, Table[x = 1; While[DigitCount[x^n, 10, k] != n, x++]; x, {n, 41}]] (* Michael De Vlieger, May 01 2017 *)
|
|
PROG
|
(PARI) A285451vec=(n, {k=4})->{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 30 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|