I see the same behavior in the latest version
$Version
(* "12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020)" *)
Clear["Global`*"]
nextK[k3_] := FullSimplify[3 + k3 + 2 Sqrt[2 + 3 k3]];
Add memorization to the definition of G
G[y_] := G[y] = nextK[G[y - 1]];
G[1] := 3
Table[G[i], {i, 3}]
(* {3, 2 (3 + Sqrt[11]), 15 + 4 Sqrt[11]} *)
The RecurrenceTable
results have not been simplified. Presumably, nextK
is first evaluated symbolically where the simplification does not change the form. Subsequent numeric values do not then have the simplification applied.
seq = RecurrenceTable[{a[n + 1] == nextK[a[n]], a[1] == 3}, a, {n, 1, 5}]
(* {3, 6 + 2 Sqrt[11], 9 + 2 Sqrt[11] + 2 Sqrt[2 + 3 (6 + 2 Sqrt[11])],
12 + 2 Sqrt[11] + 2 Sqrt[2 + 3 (6 + 2 Sqrt[11])] +
2 Sqrt[2 + 3 (9 + 2 Sqrt[11] + 2 Sqrt[2 + 3 (6 + 2 Sqrt[11])])],
15 + 2 Sqrt[11] + 2 Sqrt[2 + 3 (6 + 2 Sqrt[11])] +
2 Sqrt[2 + 3 (9 + 2 Sqrt[11] + 2 Sqrt[2 + 3 (6 + 2 Sqrt[11])])] +
2 \[Sqrt](2 +
3 (12 + 2 Sqrt[11] + 2 Sqrt[2 + 3 (6 + 2 Sqrt[11])] +
2 Sqrt[2 + 3 (9 + 2 Sqrt[11] + 2 Sqrt[2 + 3 (6 + 2 Sqrt[11])])]))} *)
seq = seq // FullSimplify
(* {3, 2 (3 + Sqrt[11]), 15 + 4 Sqrt[11], 6 (5 + Sqrt[11]), 51 + 8 Sqrt[11]} *)
Note that FindSequenceFunction
can be used to generalize from the sequence provided by RecurrenceTable
f[n_] = FindSequenceFunction[seq, n] // FullSimplify
(* 6 - 2 Sqrt[11] + n (-6 + 2 Sqrt[11] + 3 n) *)
Verifying that this result is equivalent to G
And @@ Table[G[n] == f[n], {n, 50}]
(* True *)
However, the results of f
must also be subsequently simplified to obtain the same form as G
f /@ Range[3]
(* {3, 6 + 2 Sqrt[11], 6 - 2 Sqrt[11] + 3 (3 + 2 Sqrt[11])} *)
% // FullSimplify
(* {3, 2 (3 + Sqrt[11]), 15 + 4 Sqrt[11]} *)
In[713]:= nextK[a[n]] Out[713]= 3 + a[n] + 2 Sqrt[2 + 3 a[n]]
Which meansFullSimplify
will not be seen inRecurrenceTable
. You may improve things if you useRSolve
in this case. $\endgroup$