# Need help formatting DifferenceRoot for LaTeX

I want to put this into LaTeX format. What do I do?

(FindSequenceFunction[Join[{5, 3, 3, 2}, Table[2, {80}]], k + 1] + n - 1)

-1 + n + DifferenceRoot[Function[{[FormalY], [FormalN]}, {16 - 8 [FormalN] + (3 - [FormalN]) [FormalY][[FormalN]] + (-11 + 5 [FormalN]) [FormalY][1 + [FormalN]] == 0, [FormalY][1] == 5}]][1 + k]

• Your second code snippet returns an error. You may want to correct it first. Apr 28 at 17:58
• Apr 29 at 15:03

In view of

TeXForm[DifferenceRoot[Function[{y, n}, {y[n + 2] == y[n + 1] + y[n], y[0] == 0,
y[1] == 1}]]]


TeXForm::unspt: TeXForm of DynamicModuleBox[{TypesetHolonomicAttached},FrameBox[ButtonBox[StyleBox[GridBox[{{PaneSelectorBox[<<3>>],RowBox[<<1>>]}},BaselinePosition->{1,2},GridBoxSpacings->{Rule[<<2>>],Rule[<<2>>]}],HolonomicSmall],BaselinePosition->Baseline,<<4>>,Evaluator->System,Method->Preemptive],<<5>>,BaselinePosition->Baseline],DynamicModuleValues->Automatic] is not supported.

no $$\LaTeX$$ form of DifferenceRoot is supported at the present.

You can use the function TeXForm[]

TeXForm[
(FindSequenceFunction[Join[{5, 3, 3, 2}, Table[2, {80}]],  k + 1] + n - 1)
]
`

Gives the output:

Your second code snippet uses FormalY,FormalN variables and has syntax errors

• I had tried that, but the unicode gets in the way. Apr 28 at 18:15