A155095 Numbers k such that k^2 == -1 (mod 17).
4, 13, 21, 30, 38, 47, 55, 64, 72, 81, 89, 98, 106, 115, 123, 132, 140, 149, 157, 166, 174, 183, 191, 200, 208, 217, 225, 234, 242, 251, 259, 268, 276, 285, 293, 302, 310, 319, 327, 336, 344, 353, 361, 370, 378, 387, 395, 404, 412, 421, 429, 438, 446, 455
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Programs
-
Mathematica
Select[Range[500],PowerMod[#,2,17]==16&] (* or *) LinearRecurrence[ {1,1,-1},{4,13,21},60] (* Harvey P. Dale, Jun 25 2011 *)
-
PARI
A155095(n)=n\2*17-4*(-1)^n /* M. F. Hasler, Jun 16 2010 */
Formula
From M. F. Hasler, Jun 16 2010: (Start)
a(n) = 4*(-1)^(n+1) + 17*floor(n/2).
a(n) = a(n-2) + 17 for all n > 2. (End)
From Bruno Berselli, Sep 26 2010: (Start)
G.f.: x*(4+9*x+4*x^2)/((1+x)*(1-x)^2).
a(n) - a(n-1) - a(n-2) + a(n-3) = 0 for n > 3.
a(n) = (34*n + (-1)^n - 17)/4. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(9*Pi/34)*Pi/17. - Amiram Eldar, Feb 27 2023
Extensions
Terms checked & minor edits by M. F. Hasler, Jun 16 2010
Comments