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.

Showing 1-5 of 5 results.

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

A155086 Numbers k such that k^2 == -1 (mod 13).

Original entry on oeis.org

5, 8, 18, 21, 31, 34, 44, 47, 57, 60, 70, 73, 83, 86, 96, 99, 109, 112, 122, 125, 135, 138, 148, 151, 161, 164, 174, 177, 187, 190, 200, 203, 213, 216, 226, 229, 239, 242, 252, 255, 265, 268, 278, 281, 291, 294, 304, 307, 317, 320, 330, 333, 343, 346, 356, 359
Offset: 1

Views

Author

Vincenzo Librandi, Jan 20 2009

Keywords

Comments

Numbers k such that k == 5 or 8 mod 13. - Charles R Greathouse IV, Dec 28 2011

Crossrefs

Cf. A002144, A047221 (m=5), A155095 (m=17), A156619 (m=25), A155096 (m=29), A155097 (m=37), A155098 (m=41), A154609 (bisection).

Programs

  • Magma
    I:=[5, 8, 18]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 26 2012
  • Mathematica
    LinearRecurrence[{1, 1, -1}, {5, 8, 18}, 50] (* Vincenzo Librandi, Feb 26 2012 *)
    Select[Range[1000], PowerMod[#, 2, 13] == 12 &] (* Vincenzo Librandi, Apr 24 2014 *)

Formula

a(n) = a(n-1)+a(n-2)-a(n-3).
G.f.: x*(5+3*x+5*x^2)/((1+x)*(x-1)^2) .
a(n) = 13*(n-1/2)/2 -7*(-1)^n/4.
a(n) = a(n-2)+13. - M. F. Hasler, Jun 16 2010
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(3*Pi/26)*Pi/13. - Amiram Eldar, Feb 27 2023
From Amiram Eldar, Nov 25 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = cos(Pi/26)*sec(3*Pi/26) = 1/(2*cos(Pi/13)-1).
Product_{n>=1} (1 + (-1)^n/a(n)) = cosec(5*Pi/26)/2. (End)

Extensions

Algebra simplified by R. J. Mathar, Aug 18 2009
Edited by N. J. A. Sloane, Jun 23 2010

A155096 Numbers k such that k^2 == -1 (mod 29).

Original entry on oeis.org

12, 17, 41, 46, 70, 75, 99, 104, 128, 133, 157, 162, 186, 191, 215, 220, 244, 249, 273, 278, 302, 307, 331, 336, 360, 365, 389, 394, 418, 423, 447, 452, 476, 481, 505, 510, 534, 539, 563, 568, 592, 597, 621, 626, 650, 655, 679, 684, 708, 713, 737, 742, 766
Offset: 1

Views

Author

Vincenzo Librandi, Jan 20 2009

Keywords

Comments

Numbers k such that k == 12 or 17 (mod 29). - Charles R Greathouse IV, Dec 27 2011
The first pair (a,b) is such that a+b=p, a*b=p*h+1, with h<=(p-1)/4; subsequent pairs are given as (a+kp, b+kp), k=1,2,3,...

Examples

			Let p = 29, a+b=29, a*b=29h+1, h<=7; for h=7, a+b=29, a*b=204, a=12, b=17; other pairs (12+29, 17+29) and so on.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,1,-1},{12,17,41},100] (* Vincenzo Librandi, Feb 29 2012 *)
    Select[Range[800], PowerMod[#, 2, 29] == 28 &] (* Vincenzo Librandi, Apr 24 2014 *)
    CoefficientList[Series[(12 + 5 x + 12 x^2)/((1 + x) (1 - x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, May 03 2014 *)
  • PARI
    A155096(n)=n\2*29-12*(-1)^n /* M. F. Hasler, Jun 16 2010 */

Formula

From M. F. Hasler, Jun 16 2010: (Start)
a(n) = 12*(-1)^(n+1) + 29 [n/2].
a(2k+1) = 29 k + a(1), a(2k) = 29 k - a(1), with a(1) = A002314(4) since 29 = A002144(4).
a(n) = a(n-2) + 29 for all n > 2. (End)
G.f.: x*(12 + 5*x + 12*x^2)/((1 + x)*(1 - x)^2). - Vincenzo Librandi, May 03 2014
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(5*Pi/58)*Pi/29. - Amiram Eldar, Feb 27 2023

Extensions

Terms checked & minor edits by M. F. Hasler, Jun 16 2010

A155098 Numbers k such that k^2 == -1 (mod 41).

Original entry on oeis.org

9, 32, 50, 73, 91, 114, 132, 155, 173, 196, 214, 237, 255, 278, 296, 319, 337, 360, 378, 401, 419, 442, 460, 483, 501, 524, 542, 565, 583, 606, 624, 647, 665, 688, 706, 729, 747, 770, 788, 811, 829, 852, 870, 893, 911, 934, 952, 975, 993, 1016, 1034, 1057
Offset: 1

Views

Author

Vincenzo Librandi, Jan 20 2009

Keywords

Comments

Numbers k such that k == 9 or 32 (mod 41). - Charles R Greathouse IV, Dec 27 2011

Crossrefs

Programs

Formula

From M. F. Hasler, Jun 16 2010: (Start)
a(n) = 9*(-1)^(n+1) + 41*floor(n/2).
a(2k+1) = 41*k + a(1), a(2k) = 41*k - a(1), with a(1) = A002314(6) since 41 = A002144(6).
a(n) = a(n-2) + 41 for all n > 2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = cot(9*Pi/41)*Pi/41. - Amiram Eldar, Feb 26 2023

Extensions

Terms checked & minor edits by M. F. Hasler, Jun 16 2010

A155107 Numbers that are 23 or 30 (mod 53).

Original entry on oeis.org

23, 30, 76, 83, 129, 136, 182, 189, 235, 242, 288, 295, 341, 348, 394, 401, 447, 454, 500, 507, 553, 560, 606, 613, 659, 666, 712, 719, 765, 772, 818, 825, 871, 878, 924, 931, 977, 984, 1030, 1037, 1083, 1090, 1136, 1143, 1189, 1196, 1242, 1249, 1295
Offset: 1

Views

Author

Vincenzo Librandi, Jan 20 2009

Keywords

Comments

Also, numbers k such that k^2 == -1 (mod 53).
The first pair (a,b) is such that a+b=p=53, a*b=p*h+1, with h<=(p-1)/4; subsequent pairs are given as (a+kp, b+kp), k=1,2,3...

Crossrefs

Cf. numbers n such that n^2 == -1 (mod p), where p is a prime of the form 4k+1: A047221 (p=5), A155086 (p=13), A155095 (p=17), A155096 (p=29), A155097 (p=37), A155098 (p=41), this sequence (p=53), A241406 (p=61), A241407 (p=73), A241520 (p=89), A241521 (p=97).

Programs

  • Magma
    I:=[23,30,76]; [n le 3 select I[n] else Self(n-1)+Self(n-2)-Self(n-3): n in [1..50]]; // Vincenzo Librandi, Apr 24 2014
    
  • Magma
    [-23*(-1)^n+53*Floor(n/2): n in [1..50]]; // Vincenzo Librandi, Apr 24 2014
  • Mathematica
    Select[Range[1300], PowerMod[#, 2, 53] == 52 &] (* or *) LinearRecurrence[ {1, 1, -1}, {23, 30, 76}, 50] (* Harvey P. Dale, Nov 30 2011 *)
    CoefficientList[Series[(23 + 7 x + 23 x^2)/((1 + x) (1 - x)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Apr 24 2014 *)
  • PARI
    A155107(n)=n\2*53-23*(-1)^n /* M. F. Hasler, Jun 16 2010 */
    

Formula

a(n) = 23*(-1)^(n+1) + 53*floor(n/2). - M. F. Hasler, Jun 16 2010
a(2k+1) = 53 k + a(1), a(2k) = 53 k - a(1), with a(1) = 23 = A002314(7) since 53 = A002144(7). - M. F. Hasler, Jun 16 2010
a(n) = a(n-2) + 53 for all n > 2. - M. F. Hasler, Jun 16 2010
From R. J. Mathar, Feb 19 2009: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) = 53*n/2 - 53/4 - 39*(-1)^n/4.
G.f.: x*(23 + 7*x + 23*x^2)/((1+x)*(1-x)^2). (End)

Extensions

Terms checked & minor edits by M. F. Hasler, Jun 16 2010
Showing 1-5 of 5 results.