%I #54 Jul 26 2024 15:39:14
%S 1,6,25,106,449,1902,8057,34130,144577,612438,2594329,10989754,
%T 46553345,197203134,835365881,3538666658,14990032513,63498796710,
%U 268985219353,1139439674122,4826743915841,20446415337486,86612405265785,366896036400626,1554196550868289
%N Generalized Pellian with second term of 6.
%H T. D. Noe, <a href="/A048875/b048875.txt">Table of n, a(n) for n = 0..200</a>
%H M. Bicknell, <a href="http://www.fq.math.ca/Scanned/13-4/bicknell.pdf">A Primer on the Pell Sequence and related sequences</a>, Fibonacci Quarterly, Vol. 13, No. 4, 1975, pp. 345-349.
%H L. Carlitz, R. Scoville and V. E. Hoggatt, Jr., <a href="http://www.fq.math.ca/Scanned/10-5/carlitz1.pdf">Pellian Representations</a>, Fib. Quart. Vol. 10, No. 5, (1972), pp. 449-488.
%H Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a>
%H A. K. Whitford, <a href="http://www.fq.math.ca/Scanned/15-1/whitford-a.pdf">Binet's Formula Generalized</a>, Fibonacci Quarterly, Vol. 15, No. 1, 1979, pp. 21, 24, 29.
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (4,1).
%F a(n) = ((4+sqrt(5))*(2+sqrt(5))^n - (4-sqrt(5))*(2-sqrt(5))^n)*sqrt(5)/2.
%F a(n) = 4a(n-1) + a(n-2); a(0)=1, a(1)=6.
%F Binomial transform of A134418: (1, 5, 14, 48, 152, ...). - _Gary W. Adamson_, Nov 23 2007
%F G.f.: (1+2*x)/(1-4*x-x^2). - _Philippe Deléham_, Nov 03 2008
%F a(-1 - n) = (-1)^n * A097924(n) for all n in Z. - _Michael Somos_, Feb 23 2014
%F a(n) = A001076(n+1) + 2*A001076(n). - _R. J. Mathar_, Sep 11 2019
%F a(n) = 4^n*Sum_{k=0..n} A374439(n, k)*(1/4)^k. - _Peter Luschny_, Jul 26 2024
%e G.f. = 1 + 6*x + 25*x^2 + 106*x^3 + 449*x^4 + 1902*x^5 + 8057*x^6 + 34130*x^7 + ...
%p with(combinat): a:=n->2*fibonacci(n-1,4)+fibonacci(n,4): seq(a(n), n=1..17); # _Zerinvary Lajos_, Apr 04 2008
%t LinearRecurrence[{4,1},{1,6},40] (* _Harvey P. Dale_, Nov 30 2011 *)
%t a[ n_] := (4 I ChebyshevT[ n + 1, -2 I] - 3 ChebyshevT[ n, -2 I]) I^n / 5; (* _Michael Somos_, Feb 23 2014 *)
%t a[ n_] := If[ n < 0, SeriesCoefficient[ (1 + 6 x) / (1 + 4 x - x^2), {x, 0, -n}], SeriesCoefficient[ (1 + 2 x) / (1 - 4 x - x^2), {x, 0, n}]]; (* _Michael Somos_, Feb 23 2014 *)
%o (Maxima) a[0]:1$ a[1]:6$ a[n]:=4*a[n-1]+a[n-2]$ makelist(a[n], n, 0, 30); /* _Martin Ettl_, Nov 03 2012 */
%o (PARI) {a(n) = ( 4*I*polchebyshev( n+1, 1, -2*I) - 3*polchebyshev( n, 1, -2*I)) * I^n / 5}; /* _Michael Somos_, Feb 23 2014 */
%o (PARI) {a(n) = if( n<0, polcoeff( (1 + 6*x) / (1 + 4*x - x^2) + x * O(x^-n), -n), polcoeff( (1 + 2*x) / (1 - 4*x - x^2) + x * O(x^n), n))}; \\ _Michael Somos_, Feb 23 2014
%Y Cf. A015448, A001076, A001077, A033887, A134418, A097924, A374439.
%K easy,nice,nonn
%O 0,2
%A _Barry E. Williams_
%E Corrected by _T. D. Noe_, Nov 07 2006