OFFSET
1,2
COMMENTS
The sequence a(j) is A157456, the sequence n(j) is A159679, the sequence b(j) the sequence given here.
Numbers k such that 7*k^2 + 2 is a square. - Colin Barker, Mar 17 2014
LINKS
Colin Barker, Table of n, a(n) for n = 1..800
K. Andersen, L. Carbone, and D. Penta, Kac-Moody Fibonacci sequences, hyperbolic golden ratios, and real quadratic fields, Journal of Number Theory and Combinatorics, Vol 2, No. 3 pp 245-278, 2011. See Section 9.
Index entries for linear recurrences with constant coefficients, signature (16,-1).
FORMULA
The b(j) recurrence (this sequence) is b(1)=1, b(2)=17, b(t+2) = 16*b(t+1) - b(t).
From R. J. Mathar, Oct 31 2011: (Start)
G.f.: x*(1+x) / ( 1-16*x+x^2 ).
a(n) = 16*a(n-1) - a(n-2), with a(1)=1, a(2)=17. - Harvey P. Dale, Dec 25 2011
a(n) = ( (3-sqrt(7))*(8+3*sqrt(7))^n - (3+sqrt(7))*(8-3*sqrt(7))^n )/(2*sqrt(7)). - Colin Barker, Jul 25 2016
MAPLE
for a from 1 by 2 to 100000 do b:=sqrt((9*a*a-2)/7): if (trunc(b)=b) then
n:=(a*a-1)/7: La:=[op(La), a]:Lb:=[op(Lb), b]:Ln:=[op(Ln), n]: end if: end do:
# Second program
seq(simplify(ChebyshevU(n-1, 8) + ChebyshevU(n-2, 8)), n=1..30); # G. C. Greubel, Sep 27 2022
MATHEMATICA
Rest[CoefficientList[Series[x (1+x)/(1-16x+x^2), {x, 0, 30}], x]] (* or *) LinearRecurrence[{16, -1}, {1, 17}, 30] (* Harvey P. Dale, Dec 25 2011 *)
PROG
(Sage) [(lucas_number2(n, 16, 1)-lucas_number2(n-1, 16, 1))/14 for n in range(1, 20)] # Zerinvary Lajos, Nov 10 2009
(PARI) Vec(x*(1+x)/(1-16*x+x^2) + O(x^30)) \\ Michel Marcus, Jan 03 2016
(PARI) a(n) = round((-(8-3*sqrt(7))^n*(3+sqrt(7))-(-3+sqrt(7))*(8+3*sqrt(7))^n)/(2*sqrt(7))) \\ Colin Barker, Jul 25 2016
(Magma) [n le 2 select 17^(n-1) else 16*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Jun 03 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Weisenhorn, Apr 19 2009
EXTENSIONS
More terms from Zerinvary Lajos, Nov 10 2009
STATUS
approved