login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A285449 Least number x such that x^n has n digits equal to k. Case k = 2. 3
2, 15, 138, 255, 186, 289, 418, 2619, 1846, 1532, 2551, 3142, 3235, 10567, 5755, 14083, 10481, 10399, 18565, 11703, 33933, 17668, 36766, 38724, 37841, 35933, 67309, 83236, 69451, 57508, 107027, 52016, 38672, 118132, 138785, 84636, 112234, 131131, 138087, 152719 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(4) = 255 because 255^4 = 4228250625 has 4 digits '2' 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, 2);
MATHEMATICA
Table[x = 1; While[DigitCount[x^n, 10, 2] != n, x++]; x, {n, 40}] (* Michael De Vlieger, Apr 25 2017 *)
PROG
(PARI) A285449vec=(n, {k=2})->{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
CROSSREFS
Sequence in context: A214043 A347993 A215922 * A288950 A005415 A219868
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Apr 19 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 01:22 EDT 2024. Contains 370952 sequences. (Running on oeis4.)