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 A158803 #29 Feb 26 2023 04:24:50 %S A158803 17,24,58,65,99,106,140,147,181,188,222,229,263,270,304,311,345,352, %T A158803 386,393,427,434,468,475,509,516,550,557,591,598,632,639,673,680,714, %U A158803 721,755,762,796,803,837,844,878,885,919,926,960,967,1001,1008,1042,1049 %N A158803 Numbers k such that k^2 == 2 (mod 41). %C A158803 Numbers congruent to {17, 24} mod 41. - _Amiram Eldar_, Feb 26 2023 %H A158803 Vincenzo Librandi, <a href="/A158803/b158803.txt">Table of n, a(n) for n = 1..1000</a> %H A158803 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1). %F A158803 a(n) = a(n-1) + a(n-2) - a(n-3). %F A158803 a(n) = (1/4)*(41 + 27*(-1)^(n-1) + 82*(n-1)). %F A158803 First differences: a(2n) - a(2n-1) = 7, a(2n+1) - a(2n) = 34. %F A158803 G.f.: x*(17 + 7*x + 17*x^2)/((1+x)*(x-1)^2). - _R. J. Mathar_, Apr 04 2009 %F A158803 Sum_{n>=1} (-1)^(n+1)/a(n) = tan(7*Pi/82)*Pi/41. - _Amiram Eldar_, Feb 26 2023 %t A158803 LinearRecurrence[{1, 1, -1}, {17, 24, 58}, 60] (* _Vincenzo Librandi_, Mar 02 2012 *) %t A158803 Select[Range[1200],PowerMod[#,2,41]==2&] (* _Harvey P. Dale_, Oct 24 2021 *) %o A158803 (Magma) I:=[17, 24, 58]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..60]]; // _Vincenzo Librandi_, Mar 02 2012 %o A158803 (PARI) a(n) = (1/4)*(41+27*(-1)^(n-1)+82*(n-1)); \\ _Vincenzo Librandi_, Mar 02 2012 %K A158803 nonn,easy %O A158803 1,1 %A A158803 _Vincenzo Librandi_, Mar 27 2009 %E A158803 Comments translated to formulas by _R. J. Mathar_, Apr 04 2009