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.

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