OFFSET
1,2
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 2 since 4 = 2^2.
Table of the first 20 terms of related sequences:
1: 1 1 1 1
2: 25 5 25 5
3: 36 6 36 6
4: 4 2 4 2
5: 25 5 25 5
6: 16 4 16 4
7: 576 24 576 24
8: 81 9 81 9
9: 9 3 9 3
10: 100 10 100 10
11: 121 11 121 11
12: 121 11 121 11
13: 1369 37 361 19
14: 144 12 144 12
15: 1156 34 1156 34
16: 16 4 16 4
17: 1764 42 1764 42
18: 1089 33 81 9
19: 169 13 169 13
20: 2025 45 1024 32
...
MATHEMATICA
Table[If[IntegerQ@ Sqrt@ n, Sqrt@ n, k = Floor@ Sqrt@ n; Function[t, While[Function[w, Times @@ Boole@ Map[w[[#1]] >= #2 & @@ # &, #] < 1]@ DigitCount[k^2] &@ Apply[Join, Map[Lookup[t, #] /. d_ /; IntegerQ@ d :> If[d > 0, {d, #}, {10, #}] &, Keys@ t]], k++]]@ KeyDrop[PositionIndex@ DigitCount@ n, 0]; k], {n, 69}] (* Michael De Vlieger, May 05 2017, Version 10.1 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Michael De Vlieger, May 05 2017
STATUS
approved