cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A117748 Triangular numbers divisible by 3.

Original entry on oeis.org

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

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 29 2006

Keywords

Crossrefs

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
a(n) = A299412(n)/A007494(n). - Justin Gaetano, Feb 15 2018
Sum_{n>=2} 1/a(n) = 2 - 2*Pi/(3*sqrt(3)). - Amiram Eldar, Mar 24 2021