%I #20 Mar 23 2023 17:14:26
%S 25,72,122,169,219,266,316,363,413,460,510,557,607,654,704,751,801,
%T 848,898,945,995,1042,1092,1139,1189,1236,1286,1333,1383,1430,1480,
%U 1527,1577,1624,1674,1721,1771,1818,1868,1915,1965,2012,2062,2109,2159,2206,2256
%N a(n) = (194*n + 3*(-1)^n + 1)/4 + 24.
%C Sequence list the nonnegative numbers k such that k^2 == 43 (mod 97).
%C Also, numbers k == 25 or 72 (mod 97).
%C Connected with the solvability of the congruence x^2 == 43 (mod 97) is the unsolvability of x^2 == -1 (mod 11), by the law of quadratic reciprocity.
%D Constance Reid, From zero to infinity, The Mathematical Association of America, 1992, 138-141.
%H Bruno Berselli, <a href="/A182323/b182323.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F G.f.: (25 + 47*x + 25*x^2)/((1 + x)*(1 - x)^2).
%F a(n) = -a(-n-1) = a(n-1) + a(n-2) - a(n-3).
%t Table[(194 n + 3 (-1)^n + 1)/4 + 24, {n, 0, 46}]
%t LinearRecurrence[{1,1,-1},{25,72,122},60] (* _Harvey P. Dale_, Mar 23 2023 *)
%o (PARI) Vec((25+47*x+25*x^2)/((1+x)*(1-x)^2)+O(x^47))
%o (Maxima) a[0]:25$ a[1]:72$ a[2]:122$ a[n]:=a[n-1]+a[n-2]-a[n-3]$ makelist(a[n], n, 0, 46);
%o (Magma) [n: n in [0..2300] | n^2 mod 97 eq 43];
%o (Haskell)
%o a182323 n = a182323_list !! n
%o a182323_list = filter ((== 43) . (`mod` 97) . (^ 2)) [0..]
%o -- _Reinhard Zumkeller_, Apr 25 2012
%K nonn,easy
%O 0,1
%A _Bruno Berselli_, Apr 24 2012
%E Definition changed by _Bruno Berselli_, Nov 30 2016