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.

A008837 a(n) = p*(p-1)/2 for p = prime(n).

Original entry on oeis.org

1, 3, 10, 21, 55, 78, 136, 171, 253, 406, 465, 666, 820, 903, 1081, 1378, 1711, 1830, 2211, 2485, 2628, 3081, 3403, 3916, 4656, 5050, 5253, 5671, 5886, 6328, 8001, 8515, 9316, 9591, 11026, 11325, 12246, 13203, 13861, 14878, 15931, 16290, 18145, 18528, 19306
Offset: 1

Views

Author

Keywords

Comments

Whereas A034953 is the sequence of triangular numbers with prime indices, this is the sequence of triangular numbers with numbers one less than primes for indices. - Alonso del Arte, Aug 17 2014
From Jianing Song, Apr 13 2019: (Start)
a(n) is both the number of quadratic residues and the number of nonresidues modulo prime(n)^2 that are coprime to prime(n).
For k coprime to prime(n), k^a(n) == +-1 (mod prime(n)^2). (End)

Crossrefs

Half the terms of A036689.
Cf. A000217 (triangular numbers), A112456 (least triangular number divisible by n-th prime). - Klaus Brockhaus, Nov 18 2008
Column 1 of A257253. (Row 1 of A257254).

Programs

Formula

a(n) = binomial(prime(n), 2) = A000217(A000040(n)-1). - Enrique Pérez Herrero, Dec 10 2011
a(n) = (1/2)*A072230(A000040(n)). - L. Edson Jeffery, Apr 07 2012
a(n) = (phi(prime(n))^2 + phi(prime(n)))/2, where phi(n) is Euler's totient function, A000010. - Alonso del Arte, Aug 22 2014
a(n) = A036689(n)/2. - Antti Karttunen, May 01 2015
Product_{n>=2} (1 - 1/a(n)) = A271780. - Amiram Eldar, Nov 22 2022

Extensions

Offset changed from 2 to 1 by Harry J. Smith, Jul 25 2009