The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A008837 a(n) = p*(p-1)/2 for p = prime(n). 28
 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 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) LINKS Harry J. Smith, Table of n, a(n) for n = 1..1000 FORMULA a(n) = binomial(prime(n), 2) = A000217(A000040(n)). - 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 MATHEMATICA Table[Prime[n] * (Prime[n] - 1)/2, {n, 22}] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *) Table[Binomial[Prime[n], 2], {n, 40}] (* Alonso del Arte, Aug 22 2014, based on the formula from Enrique Pérez Herrero *) (#(#-1))/2&/@Prime[Range[50]] (* Harvey P. Dale, Oct 02 2019 *) PROG (MAGMA) [ (k-1)*k/2 where k is NthPrime(n): n in [1..44] ]; // Klaus Brockhaus, Nov 18 2008 (PARI) { n=0; forprime (p=2, prime(1000), write("b008837.txt", n++, " ", p*(p - 1)/2) ) } \\ Harry J. Smith, Jul 25 2009 (Scheme) (define (A008837 n) (/ (A036689 n) 2)) ;; Antti Karttunen, May 01 2015 CROSSREFS Half the terms of A036689. Cf. A000217 (triangular numbers), A112456 (least triangular number divisible by n-th prime). - Klaus Brockhaus, Nov 18 2008 Cf. A072230, A034953. Column 1 of A257253. (Row 1 of A257254). Sequence in context: A295063 A298856 A006308 * A176098 A081950 A204340 Adjacent sequences:  A008834 A008835 A008836 * A008838 A008839 A008840 KEYWORD nonn,easy AUTHOR EXTENSIONS Offset changed from 2 to 1 by Harry J. Smith, Jul 25 2009 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 7 02:48 EDT 2020. Contains 334836 sequences. (Running on oeis4.)