cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

7, 76, 83, 118, 206, 959, 1083, 726, 1387, 1114, 3313, 4011, 2184, 3881, 4792, 13071, 11564, 15523, 9208, 15232, 17771, 46336, 33815, 39147, 18083, 27624, 63435, 77276, 24354, 92341, 15776, 67006, 112877, 54468, 67996, 109996, 99376, 154083, 58937, 148722, 77335
Offset: 1

Views

Author

Paolo P. Lava, Apr 19 2017

Keywords

Examples

			a(4) = 118 because 118^4 = 193877776 has 4 digits '7' and is the least number to have this property.
		

Crossrefs

Cf. A039938.

Programs

  • 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,7);
  • Mathematica
    f[n_] := Block[{k = 1}, While[ Count[ IntegerDigits[k^n], 7] != n, k++]; k]; Array[f, 41] (* Robert G. Wilson v, Apr 30 2017 *)