%I #7 Nov 16 2014 06:43:49
%S 1,5,2,1,65,17,3,5,1,13,82,37,346,798,10,1,41,257,72829155,65,4238,
%T 269,3,17,1,2501,626,2039422,2522,101,3303936030,2567,646,23358,26,1,
%U 5185,1297,577,13,1507985,145,15004500051,189987,445445,143733855087930,431211
%N a(n) is the number m such that f(sqrt(n)) is in the field Q(sqrt(m)), where f(x) is defined from the continued fraction x = [c(0), c(1), ... ] as [c(0)^2, c(1)^2, ...].
%e f(sqrt(2)) = f([1,2,2,...]) = [1,4,4,...] = -1 + sqrt(5), so a(2) = 5.
%t $MaxExtraPrecision = Infinity;
%t c[x_] := c[x] = FromContinuedFraction[ContinuedFraction[x]^2]
%t Table[c[Sqrt[n]], {n, 1, 30}]
%t f[y_] := Cases[y, x_^(1/2 | -1/2) :> x, Infinity]
%t t = Table[f[c[Sqrt[n]]], {n, 1, 80}]; Flatten[ t /. {} -> 1] (* _Peter J. C. Moses_, Oct 04 2013 *)
%Y Cf. A229956, A229957, A229958.
%K nonn
%O 1,2
%A _Clark Kimberling_, Oct 04 2013