This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A158598 #30 Jan 17 2025 06:53:56 %S A158598 39,159,359,639,999,1439,1959,2559,3239,3999,4839,5759,6759,7839,8999, %T A158598 10239,11559,12959,14439,15999,17639,19359,21159,23039,24999,27039, %U A158598 29159,31359,33639,35999,38439,40959,43559,46239,48999,51839,54759,57759,60839,63999,67239 %N A158598 a(n) = 40*n^2 - 1. %C A158598 The identity (40*n^2 - 1)^2 - (400*n^2 - 20)*(2*n)^2 = 1 can be written as a(n)^2 - A158597(n)*A005843(n)^2 = 1. %H A158598 Vincenzo Librandi, <a href="/A158598/b158598.txt">Table of n, a(n) for n = 1..10000</a> %H A158598 Vincenzo Librandi, <a href="https://web.archive.org/web/20090309225914/http://mathforum.org/kb/message.jspa?messageID=5785989&tstart=0">X^2-AY^2=1</a>, Math Forum, 2007. [Wayback Machine link] %H A158598 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1). %F A158598 G.f.: x*(-39 - 42*x + x^2)/(x-1)^3. %F A158598 a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). %F A158598 From _Amiram Eldar_, Mar 16 2023: (Start) %F A158598 Sum_{n>=1} 1/a(n) = (1 - cot(Pi/(2*sqrt(10)))*Pi/(2*sqrt(10)))/2. %F A158598 Sum_{n>=1} (-1)^(n+1)/a(n) = (cosec(Pi/(2*sqrt(10)))*Pi/(2*sqrt(10)) - 1)/2. (End) %F A158598 From _Elmo R. Oliveira_, Jan 16 2025: (Start) %F A158598 E.g.f.: exp(x)*(40*x^2 + 40*x - 1) + 1. %F A158598 a(n) = A158447(2*n). (End) %t A158598 LinearRecurrence[{3, -3, 1}, {39, 159, 359}, 50] (* _Vincenzo Librandi_, Feb 16 2012 *) %t A158598 40*Range[40]^2-1 (* _Harvey P. Dale_, Jan 31 2022 *) %o A158598 (Magma) I:=[39, 159, 359]; [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 16 2012 %o A158598 (PARI) for(n=1, 40, print1(40*n^2 - 1", ")); \\ _Vincenzo Librandi_, Feb 16 2012 %Y A158598 Cf. A005843, A158447, A158597. %K A158598 nonn,easy %O A158598 1,1 %A A158598 _Vincenzo Librandi_, Mar 22 2009 %E A158598 Comment rewritten, formula replaced by _R. J. Mathar_, Oct 28 2009