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.

A087397 Smallest triangular number > 1 and == 1 (mod prime(n)).

Original entry on oeis.org

3, 10, 6, 15, 45, 66, 120, 153, 231, 378, 435, 630, 780, 861, 1035, 1326, 1653, 1770, 2145, 2415, 2556, 3003, 3321, 3828, 4560, 4950, 5151, 5565, 5778, 6216, 7875, 8385, 9180, 9453, 10878, 11175, 12090, 13041, 13695, 14706, 15753, 16110, 17955, 18336
Offset: 1

Views

Author

Amarnath Murthy, Sep 10 2003

Keywords

Examples

			a(7) = 120 == 1 (mod 17), prime (7) = 17.
		

Programs

  • Magma
    [3,10] cat [(NthPrime(n)-2)*(NthPrime(n)-1)/2: n in [3..50]]; // Vincenzo Librandi, Dec 24 2018
  • Maple
    3,10, seq((ithprime(i)-2)*(ithprime(i)-1)/2, i=3..50); # Robert Israel, Dec 23 2018
  • Mathematica
    Join[{3, 10}, Table[(Prime[n] - 2) (Prime[n] - 1) / 2, {n, 3, 50}]] (* Vincenzo Librandi, Dec 24 2018 *)

Formula

a(n) = (prime(n)-2)*(prime(n)-1)/2 for n >= 3.

Extensions

More terms from David Wasserman, Jun 01 2005
Edited by Robert Israel, Dec 23 2018