OFFSET
2,2
COMMENTS
This sequence is a subsequence of the triangular numbers (A000217) because (prime(n)^2-1)/8 = ((2m+1)^2-1)/8 = m(m+1)/2 where p=2m+1 for a given m. - David Morales Marciel, Oct 07 2015
The Jacobi symbol (2|p) = (-1)^((p^2-1)/8). - Michael Somos, Feb 17 2020
Number of inversions of the permutation ((2*i) mod p)_{1<=i<=p-1} = (2,4,...,p-1,1,3,...,p-2) of {1,2,...,p-1}, where p = prime(n). - Jianing Song, Apr 07 2023
REFERENCES
J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 307.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 2..1000
FORMULA
a(n) = (3/8)*A024700(n-2). - G. C. Greubel, May 03 2024
EXAMPLE
a(2) = 1 because p = prime(2) = 3 and (3^2-1)/8 = 1. - Michael Somos, Feb 17 2020
MATHEMATICA
f[n_]:=(Prime[n]^2-1)/8; Array[f, 66, 2] (* Vladimir Joseph Stephan Orlovsky, Aug 06 2009 *)
(#^2-1)/8&/@Prime[Range[2, 50]] (* Harvey P. Dale, Nov 16 2012 *)
PROG
(PARI) vector(100, n, (prime(n+1)^2 - 1)/8) \\ Altug Alkan, Oct 07 2015
(Magma) [(p^2-1)/8: p in PrimesInInterval(3, 300)]; // G. C. Greubel, May 03 2024
(SageMath) [(n^2-1)/8 for n in prime_range(3, 301)] # G. C. Greubel, May 03 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 28 2001
STATUS
approved