OFFSET
1,2
COMMENTS
Numbers of the type floor(3*m*(m+1)/4) for which floor(3*m*(m+1)/4) = 3*floor(m*(m+1)/4). A014601 lists the values of m. - Bruno Berselli, Jan 13 2017
Numbers of the form 3*k*(4*k + 1) for k in Z. - Peter Bala, Nov 21 2024
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
G.f.: 3*x^2*(3 + 2*x + 3*x^2) / ((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>5.
a(n) = 3*(2*n - 1)*(2*n + (-1)^n - 1)/4. Therefore:
a(n) = 3*n*(2*n - 1)/2 for n even,
a(n) = 3*(n-1)*(2*n - 1)/2 for n odd.
MATHEMATICA
Table[3 (2 n - 1) (2 n + (-1)^n - 1)/4, {n, 1, 60}] (* Bruno Berselli, Jul 08 2016 *)
PROG
(PARI) isok(n) = ispolygonal(6*n+1, 3)
(PARI) select(n->ispolygonal(6*n+1, 3), vector(7000, n, n-1))
(PARI) concat(0, Vec(3*x^2*(3+2*x+3*x^2)/((1-x)^3*(1+x)^2) + O(x^60)))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Jul 04 2016
STATUS
approved