Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #23 Sep 25 2024 17:05:55
%S 1010,5297,12946,23957,38330,56065,77162,101621,129442,160625,195170,
%T 233077,274346,318977,366970,418325,473042,531121,592562,657365,
%U 725530,797057,871946,950197,1031810,1116785,1205122,1296821,1391882,1490305
%N a(n) = 1681*n^2 - 756*n + 85.
%C The identity (5651522*n^2 -2541672*n +285769)^2 - (1681*n^2 -756*n +85) * (137842*n -30996)^2 = 1 can be written as (A157106(n))^2 - (a(n))*(A157105(n))^2 = 1.
%H Vincenzo Librandi, <a href="/A157010/b157010.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>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F a(n) = 3*a(n-1) -3*a(n-2) +a(n-3).
%F G.f: x*(1010 + 2267*x + 85*x^2)/(1-x)^3.
%F E.g.f.: -85 + (85 + 925*x + 1681*x^2)*exp(x). - _G. C. Greubel_, Feb 23 2019
%p A157010:=n->1681*n^2 - 756*n + 85; seq(A157010(n), n=1..30); # _Wesley Ivan Hurt_, Jan 24 2014
%t LinearRecurrence[{3,-3,1},{1010,5297,12946},30]
%t Table[1681n^2-756n+85,{n,40}] (* _Harvey P. Dale_, Sep 25 2024 *)
%o (Magma) I:=[1010, 5297, 12946]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]];
%o (PARI) a(n) = 1681*n^2 - 756*n + 85.
%o (Sage) [1681*n^2 - 756*n + 85 for n in (1..40)] # _G. C. Greubel_, Feb 23 2019
%o (GAP) List([1..40], n-> 1681*n^2 - 756*n + 85) # _G. C. Greubel_, Feb 23 2019
%Y Cf. A157105, A157106.
%K nonn,easy
%O 1,1
%A _Vincenzo Librandi_, Feb 23 2009