login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

Martin Gossow, Table of n, a(n) for n = 1..100

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

Sequence in context: A080448 A155174 A053491 * A249788 A032323 A053551

Adjacent sequences:  A285448 A285449 A285450 * A285452 A285453 A285454

KEYWORD

nonn,base,easy

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 23 05:56 EDT 2019. Contains 328335 sequences. (Running on oeis4.)