login
A130518
a(n) = Sum_{k=0..n} floor(k/3). (Partial sums of A002264.)
25
0, 0, 0, 1, 2, 3, 5, 7, 9, 12, 15, 18, 22, 26, 30, 35, 40, 45, 51, 57, 63, 70, 77, 84, 92, 100, 108, 117, 126, 135, 145, 155, 165, 176, 187, 198, 210, 222, 234, 247, 260, 273, 287, 301, 315, 330, 345, 360, 376, 392, 408, 425, 442, 459, 477, 495, 513, 532, 551, 570
OFFSET
0,5
COMMENTS
Complementary with A130481 regarding triangular numbers, in that A130481(n) + 3*a(n) = n(n+1)/2 = A000217(n).
Apart from offset, the same as A062781. - R. J. Mathar, Jun 13 2008
Apart from offset, the same as A001840. - Michael Somos, Sep 18 2010
The sum of any three consecutive terms is a triangular number. - J. M. Bergot, Nov 27 2014
Also, expected number of intersection points, when n cords are randomly chosen on a circle (i.e., each endpoint is chosen with uniform random distribution on the circle), rounded to the nearest integer. The rounding (down) occurs only for n==2 (mod 3), where the expectation value is 1/3 above the nearest integer. For n=2, there are 3 possible configurations of the two cords with equal probability, in one of which there is an intersection point, so the exact expectation value is 1/3. Applying this to each of the C(n,2) = n(n-1)/2 possible pairs yields the result also for other n. - M. F. Hasler, Jun 16 2026
FORMULA
G.f.: x^3 / ((1-x^3)*(1-x)^2).
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
a(n) = (1/2)*floor(n/3)*(2*n - 1 - 3*floor(n/3)) = A002264(n)*(2n - 1 - 3*A002264(n))/2.
a(n) = (1/2)*A002264(n)*(n - 1 + A010872(n)).
a(n) = round(n*(n-1)/6) = round((n^2-n-1)/6) = floor(n*(n-1)/6) = ceiling((n+1)*(n-2)/6). - Mircea Merca, Nov 28 2010
a(n) = a(n-3) + n - 2, n > 2. - Mircea Merca, Nov 28 2010
a(n) = A214734(n, 1, 3). - Renzo Benedetti, Aug 27 2012
a(3n) = A000326(n), a(3n+1) = A005449(n), a(3n+2) = 3*A000217(n) = A045943(n). - Philippe Deléham, Mar 26 2013
a(n) = (3*n*(n-1) - (-1)^n*((1+i*sqrt(3))^(n-2) + (1-i*sqrt(3))^(n-2))/2^(n-3) - 2)/18, where i=sqrt(-1). - Bruno Berselli, Nov 30 2014
Sum_{n>=3} 1/a(n) = 20/3 - 2*Pi/sqrt(3). - Amiram Eldar, Sep 17 2022
a(n) = floor(n*(n-1)/6), where "floor" could also be replaced with "round". - M. F. Hasler, Jun 16 2026
MAPLE
seq(floor(n*(n-1)/6), n=0..60); # Robert Israel, Nov 27 2014
MATHEMATICA
Table[n, {n, 0, 19}, {3}] // Flatten // Accumulate (* Jean-François Alcover, Jun 05 2013 *)
PROG
(SageMath) [floor(binomial(n, 2)/3) for n in range(0, 60)] # Zerinvary Lajos, Dec 01 2009
(Magma) [Round(n*(n-1)/6): n in [0..60]]; // Vincenzo Librandi, Jun 25 2011
(PARI) a(n)=n*(n-1)\/6 \\ Charles R Greathouse IV, Jun 05 2013
(GAP) List([0..60], n-> Int(n*(n-1)/6)); # G. C. Greubel, Aug 31 2019
(Python)
from math import comb
def A130518(n): return comb(n, 2)//3 # Chai Wah Wu, Jun 17 2026
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, Jun 01 2007
STATUS
approved