login
a(n) = 729*n^2 + 27.
2

%I #22 Mar 19 2023 02:45:14

%S 27,756,2943,6588,11691,18252,26271,35748,46683,59076,72927,88236,

%T 105003,123228,142911,164052,186651,210708,236223,263196,291627,

%U 321516,352863,385668,419931,455652,492831,531468,571563,613116,656127,700596,746523,793908,842751

%N a(n) = 729*n^2 + 27.

%C The identity (54*n^2 + 1)^2 - (729*n^2 + 27)*(2*n)^2 = 1 can be written as A158646(n)^2 - a(n)*A005843(n)^2 = 1.

%H Vincenzo Librandi, <a href="/A158645/b158645.txt">Table of n, a(n) for n = 0..10000</a>

%H Vincenzo Librandi, <a href="https://web.archive.org/web/20090309225914/http://mathforum.org/kb/message.jspa?messageID=5785989&amp;tstart=0">X^2-AY^2=1</a>, Math Forum, 2007. [Wayback Machine link]

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).

%F G.f.: -27*(1 + 25*x + 28*x^2)/(x-1)^3.

%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).

%F From _Amiram Eldar_, Mar 19 2023: (Start)

%F Sum_{n>=0} 1/a(n) = (coth(Pi/sqrt(27))*Pi/sqrt(27) + 1)/54.

%F Sum_{n>=0} (-1)^n/a(n) = (cosech(Pi/sqrt(27))*Pi/sqrt(27) + 1)/54. (End)

%t LinearRecurrence[{3, -3, 1}, {27, 756, 2943}, 50] (* _Vincenzo Librandi_, Feb 17 2012 *)

%o (Magma) I:=[27, 756, 2943]; [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 17 2012

%o (PARI) for(n=0, 40, print1(729*n^2 + 27", ")); \\ _Vincenzo Librandi_, Feb 17 2012

%Y Cf. A005843, A158646.

%K nonn,easy

%O 0,1

%A _Vincenzo Librandi_, Mar 23 2009

%E Comment rephrased and redundant formula replaced by _R. J. Mathar_, Oct 19 2009