%I #6 May 05 2017 12:34:30
%S 1,5,6,2,5,4,24,9,3,10,11,11,37,12,34,4,42,33,13,45,11,15,48,18,5,16,
%T 52,17,17,48,19,18,56,18,55,6,61,59,37,20,21,65,66,12,65,64,69,22,7,
%U 50,39,23,73,71,75,16,24,72,23,40,19,25,128,8,25,26,26,41,13,52,61,27,86,28
%N Square roots of A068165.
%H Michael De Vlieger, <a href="/A091873/b091873.txt">Table of n, a(n) for n = 1..10000</a>
%t Table[If[IntegerQ@ Sqrt@ n, Sqrt@ n, k = 1;
%t Function[a,
%t Function[t,
%t While[Function[b,
%t Function[w,
%t Nand[Times @@ Boole@ Map[w[[#1]] >= #2 & @@ # &, #] == 1,
%t Length@ SequencePosition[
%t Select[b,
%t Function[d, MemberQ[#[[All, 1]], d /. 0 -> 10]]],
%t a] > 0]]@ RotateLeft@ BinCounts[b, {0, 10, 1}]]@
%t IntegerDigits[k^2] &@
%t Apply[Join,
%t Map[Lookup[t, #] /.
%t d_ /; IntegerQ@ d :> If[d > 0, {d, #}, {10, #}] &,
%t Keys@t]], k++]]@
%t KeyDrop[PositionIndex@ RotateLeft@ BinCounts[a, {0, 10, 1}], 0]]@
%t IntegerDigits@ n; k], {n, 74}] (* _Michael De Vlieger_, May 05 2017, Version 10.1 *)
%K base,easy,nonn
%O 1,2
%A _Ray Chandler_, Feb 07 2004
|