cp's OEIS Frontend

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.

A155095 Numbers k such that k^2 == -1 (mod 17).

Original entry on oeis.org

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

Views

Author

Vincenzo Librandi, Jan 20 2009

Keywords

Comments

The first pair (a,b) is such that a+b=p, a*b=p*h+1, with h<=(p-1)/4; other pairs are given by(a+kp, b+kp), k=1,2,3...
Numbers congruent to {4, 13} mod 17. - Amiram Eldar, Feb 27 2023

Crossrefs

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(2k+1) = 17 k + a(1), a(2k) = 17 k - a(1), with a(1) = A002314(3) since 17 = A002144(3).
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