login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A061066
a(n) = (prime(n)^2 - 1)/8.
3
1, 3, 6, 15, 21, 36, 45, 66, 105, 120, 171, 210, 231, 276, 351, 435, 465, 561, 630, 666, 780, 861, 990, 1176, 1275, 1326, 1431, 1485, 1596, 2016, 2145, 2346, 2415, 2775, 2850, 3081, 3321, 3486, 3741, 4005, 4095, 4560, 4656, 4851, 4950, 5565, 6216, 6441
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
FORMULA
a(n) = A000217(A005097(n-1)). - after first comment, Michel Marcus, Oct 07 2015
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