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-2 of 2 results.

A030006 a(n) = (prime(n)-1)*(prime(n)-5)/12.

Original entry on oeis.org

0, 1, 5, 8, 16, 21, 33, 56, 65, 96, 120, 133, 161, 208, 261, 280, 341, 385, 408, 481, 533, 616, 736, 800, 833, 901, 936, 1008, 1281, 1365, 1496, 1541, 1776, 1825, 1976, 2133, 2241, 2408, 2581, 2640, 2945, 3008, 3136, 3201, 3605, 4033, 4181, 4256, 4408, 4641
Offset: 3

Views

Author

Keywords

Comments

Confirmed a(n) = A242090(n) for 3 <= n <= 4000. - Fausto A. C. Cariboni, Feb 23 2019

Crossrefs

Cf. A000040.

Programs

  • Mathematica
    Table[(p - 1) (p - 5)/12, {p, Prime[Range[3, 50]]}] (* T. D. Noe, Apr 16 2012 *)
    ((#-1)(#-5))/12&/@Prime[Range[3,60]] (* Harvey P. Dale, Aug 13 2023 *)

A242089 Number of triples (a,b,c) with 0 < a < b < c < p and a + b + c == 0 mod p, where p = prime(n).

Original entry on oeis.org

0, 0, 0, 2, 10, 16, 32, 42, 66, 112, 130, 192, 240, 266, 322, 416, 522, 560, 682, 770, 816, 962, 1066, 1232, 1472, 1600, 1666, 1802, 1872, 2016, 2562, 2730, 2992, 3082, 3552, 3650, 3952, 4266, 4482, 4816, 5162, 5280, 5890, 6016, 6272, 6402, 7210, 8066, 8362, 8512
Offset: 1

Views

Author

Jonathan Sondow, Jun 16 2014

Keywords

Comments

a(n) is even. (Proof. Each triple (a,b,c) with b < p/2 pairs uniquely with a triple (a',b',c') = (p-c,p-b,p-a) with b' > p/2.)

Examples

			For prime(4) = 7 there are 2 triples (a,b,c) with 0 < a < b < c < 7 and a + b + c == 0 mod 7, namely, 1+2+4 = 7 and 3+5+6 = 2*7, so a(4) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[ Length[ Reduce[ Mod[a + b + c, Prime[n]] == 0 && 0 < a < b < c < Prime[n], {a, b, c}, Integers]], {n, 40}]
  • PARI
    a(n) = 2 * round((prime(n) - 3)^2/12) \\ David A. Corneth, May 27 2025

Formula

a(n) = 2*A242090(n).
a(n) = 2*A069905(prime(n)-3) = 2 * round((prime(n) - 3)^2/12). - David A. Corneth, May 27 2025

Extensions

a(41)-a(50) from Fausto A. C. Cariboni, Sep 30 2018
Showing 1-2 of 2 results.