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.

A331764 a(n) = ((p-1)^3 - (p-1)^2)/4 where p is the n-th prime.

Original entry on oeis.org

0, 1, 12, 45, 225, 396, 960, 1377, 2541, 5292, 6525, 11340, 15600, 18081, 23805, 34476, 47937, 53100, 70785, 84525, 92016, 117117, 136161, 168432, 218880, 247500, 262701, 294945, 312012, 348096, 496125, 545025, 624240, 652257, 804972, 838125, 943020
Offset: 1

Views

Author

N. J. A. Sloane, Feb 05 2020 following a suggestion from Jean-Claude Babois

Keywords

Programs

  • Maple
    a:= n-> (p-> ((p-1)^3-(p-1)^2)/4)(ithprime(n)):
    seq(a(n), n=1..40);  # Alois P. Heinz, Feb 05 2020
  • Mathematica
    Table[((Prime[n] - 1)^3 - (Prime[n] - 1)^2)/4, {n, 20}] (* Eric W. Weisstein, Aug 22 2021 *)
    Table[((Prime[n] - 2) (Prime[n] - 1)^2)/4, {n, 20}] (* Eric W. Weisstein, Aug 22 2021 *)
    Table[Times @@ (Prime[n] - {1, 1, 2})/4, {n, 20}] (* Eric W. Weisstein, Aug 22 2021 *)
    Table[Sum[Floor[i j/Prime[n]], {i, Prime[n] - 1}, {j, Prime[n] - 1}], {n, 20}] (* Eric W. Weisstein, Aug 22 2021 *)

Formula

Theorem: a(n) = Sum_{i=1..p-1, j=1..p-1} floor(i*j/p). The proof is based on the formula for p-g-c-d of Marcelo Polezzi. - Jean-Claude Babois
a(n) == 0 (mod 3) for n >= 3. - Hugo Pfoertner, Aug 23 2021