OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
C. Elsner, Series of Error Terms for Rational Approximations of Irrational Numbers , J. Int. Seq. 14 (2011) # 11.1.4.
C. Elsner, M. Stein, On Error Sum Functions Formed by Convergents of Real Numbers, J. Int. Seq. 14 (2011) # 11.8.6.
Index entries for linear recurrences with constant coefficients, signature (0,0,0,16,0,0,0,-1).
FORMULA
G.f.: (2 + 3*x + 5*x^2 + 8*x^3 + 5*x^4 - 3*x^5 + 2*x^6 - x^7)/(1 - 16*x^4 + x^8).
MATHEMATICA
Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[7], n]]], {n, 1, 50}] (* Vladimir Joseph Stephan Orlovsky, Mar 16 2011 *)
Numerator[Convergents[Sqrt[7], 30]] (* Vincenzo Librandi, Oct 28 2013 *)
LinearRecurrence[{0, 0, 0, 16, 0, 0, 0, -1}, {2, 3, 5, 8, 37, 45, 82, 127}, 40] (* Harvey P. Dale, Jul 23 2021 *)
PROG
From M. F. Hasler, Nov 01 2019: (Start)
(PARI) A041008=contfracpnqn(c=contfrac(sqrt(7)), #c)[1, ][^-1] \\ Discard possibly incorrect last element. NB: a(n)=A041008[n+1]! For more terms use:
extend(A, c, N)={for(n=#A+1, #A=Vec(A, N), A[n]=[A[n-i]|i<-c[, 1]]*c[, 2]); A} \\ (End)
CROSSREFS
KEYWORD
nonn,cofr,frac,easy
AUTHOR
STATUS
approved