%I #30 Aug 04 2024 12:51:38
%S 6,33,78,141,222,321,438,573,726,897,1086,1293,1518,1761,2022,2301,
%T 2598,2913,3246,3597,3966,4353,4758,5181,5622,6081,6558,7053,7566,
%U 8097,8646,9213,9798,10401,11022,11661,12318,12993,13686,14397,15126,15873,16638
%N a(n) = 9*n^2 - 3.
%C The identity (6n^2 - 1)^2 - (9n^2 - 3)*(2n)^2 = 1 can be written as A140811(n-1)^2 - a(n)*A005843(n+1)^2 = 1. - _Vincenzo Librandi_, Feb 05 2012
%H Vincenzo Librandi, <a href="/A157872/b157872.txt">Table of n, a(n) for n = 1..10000</a>
%H Vincenzo Librandi, <a href="http://mathforum.org/kb/message.jspa?messageID=5785989&tstart=0">X^2-AY^2=1</a>. [broken link]
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F G.f.: -3*x*(2 + 5*x - x^2)/(x - 1)^3. - _Vincenzo Librandi_, Feb 05 2012
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - _Vincenzo Librandi_, Feb 05 2012
%F a(n) = a(n-1) + 18*n - 9. - _Vincenzo Librandi_, Feb 05 2012
%F From _Amiram Eldar_, May 28 2022: (Start)
%F a(n) = 3*A080663(n).
%F Sum_{n>=1} 1/a(n) = (1 - (Pi/sqrt(3)*cot(Pi/sqrt(3))))/6.
%F Sum_{n>=1} (-1)^(n+1)/a(n) = ((Pi/sqrt(3))*csc(Pi/sqrt(3)) - 1)/6. (End)
%t LinearRecurrence[{3, -3, 1}, {6, 33, 78}, 50] (* _Vincenzo Librandi_, Feb 05 2012 *)
%t 9*Range[50]^2-3 (* _Harvey P. Dale_, Aug 04 2024 *)
%o (Magma) I:=[6, 33, 78]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // _Vincenzo Librandi_, Feb 05 2012
%o (PARI) for(n=1, 40, print1(9*n^2 - 3", ")); \\ _Vincenzo Librandi_, Feb 05 2012
%Y Cf. A005843, A080663, A140811.
%K nonn,easy
%O 1,1
%A _Vincenzo Librandi_, Mar 08 2009