A117748 Triangular numbers divisible by 3.
0, 3, 6, 15, 21, 36, 45, 66, 78, 105, 120, 153, 171, 210, 231, 276, 300, 351, 378, 435, 465, 528, 561, 630, 666, 741, 780, 861, 903, 990, 1035, 1128, 1176, 1275, 1326, 1431, 1485, 1596, 1653, 1770, 1830, 1953, 2016, 2145, 2211, 2346, 2415, 2556, 2628, 2775
Offset: 1
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- D. H. Lehmer, Recurrence formulas for certain divisor functions, Bull. Amer. Math. Soc., Vol. 49, No. 2 (1943), pp. 150-156.
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Programs
-
Mathematica
LinearRecurrence[{1,2,-2,-1,1}, {0, 3, 6, 15, 21}, 50] (* G. C. Greubel, Jun 19 2017 *) Select[Accumulate[Range[0,100]],Divisible[#,3]&] (* Harvey P. Dale, Feb 11 2018 *)
-
PARI
lista(nn) = {for (i = 0, nn, t = i*(i+1)/2; if (t % 3 == 0, print1(t, ", ");));} \\ Michel Marcus, Jun 01 2013
-
PARI
concat(0, Vec(3*x^2*(1+x+x^2)/((1-x)^3*(1+x)^2) + O(x^50))) \\ Colin Barker, Apr 24 2016
Formula
a(n) = 3*A001318(n-1). - Michel Marcus, Apr 24 2016
From Colin Barker, Apr 24 2016: (Start)
a(n) = 3*(1-(-1)^n + 2*(-3+(-1)^n)*n + 6*n^2)/16.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 5.
G.f.: 3*x^2*(1+x+x^2) / ((1-x)^3*(1+x)^2).
(End)
E.g.f.: 3*(-1 - 2*x + exp(2*x) + 6*x^2*exp(2*x))*exp(-x)/16. - Ilya Gutkovskiy, Apr 24 2016
Sum_{n>=2} 1/a(n) = 2 - 2*Pi/(3*sqrt(3)). - Amiram Eldar, Mar 24 2021