%I #22 Sep 08 2022 08:45:42
%S 500001,21898963,74859849,159382659,275467393,423114051,602322633,
%T 813093139,1055425569,1329319923,1634776201,1971794403,2340374529,
%U 2740516579,3172220553,3635486451,4130314273,4656704019,5214655689,5804169283
%N a(n) = 15780962*n^2 - 25943924*n + 10662963.
%C The identity (15780962*n^2 - 25943924*n + 10662963)^2 - (2809*n^2 - 4618*n+1898)*(297754*n - 244754)^2 = 1 can be written as a(n)^2 - A157757(n)*A157758(n)^2 = 1.
%C This is the case s=53 and r=2309 of the identity (2*(s^2*n-r)^2+1)^2 - (((s^2*n-r)^2+1)/s^2)*(2*s*(s^2*n-r))^2 = 1, where ((s^2*n-r)^2+1)/s^2 is an integer if r^2 == -1 (mod s^2). Therefore, for s=53, nonnegative r values are: 500, 2309, 3309, 5118, 6118, 7927, 8927, 10736, 11736, ... - _Bruno Berselli_, Apr 24 2018
%H Vincenzo Librandi, <a href="/A157759/b157759.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F G.f.: x*(500001 - 20398960*x - 10662963*x^2)/(1 - x)^3.
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
%t LinearRecurrence[{3, -3, 1}, {500001, 21898963, 74859849}, 30]
%o (Magma) I:=[500001, 21898963, 74859849]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..30]];
%o (PARI) a(n) = 15780962*n^2 - 25943924*n + 10662963;
%Y Cf. A157757, A157758.
%K nonn,easy
%O 1,1
%A _Vincenzo Librandi_, Mar 06 2009