OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
L. Euler and J. Hewlett, Elements of Algebra, Chapter V, Of Figurate or Polygonal Numbers, Springer-Verlag. 1984. See pages 139-145.
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,3,-3,0,0,0,-3,3,0,0,0,1,-1).
FORMULA
Let m = floor((6*n+4)/5), a(n) = (3*m/2)*binomial(m+1,2) if m is even, otherwise ((3*m+1)/2)*binomial(m+1,2).
Conjectures from Colin Barker, Feb 15 2018: (Start)
G.f.: 3*x*(3 + 7*x + 10*x^2 + 20*x^3 + 23*x^4 + 72*x^5 + 45*x^6 + 35*x^7 + 39*x^8 + 25*x^9 + 33*x^10 + 8*x^11 + 3*x^12 + x^13) / ((1 - x)^4*(1 + x + x^2 + x^3 + x^4)^3).
a(n) = a(n-1) + 3*a(n-5) - 3*a(n-6) - 3*a(n-10) + 3*a(n-11) + a(n-15) - a(n-16) for n>15.
(End)
Colin Barker's conjecture is true. This is a cubic quasipolynomial of order 5: a(n) = 162/125*n^3 + 27/25*n^2 if n is 0 mod 5, 162/125*n^3 + 261/125*n^2 + 111/125*n + 12/125 if n is 4 mod 5, 162/125*n^3 + 297/125*n^2 + 144/125*n + 21/125 if n is 3 mod 5, 162/125*n^3 + 423/125*n^2 + 339/125*n + 84/125 if n is 2 mod 5, and 162/125*n^3 + 459/125*n^2 + 396/125*n + 108/125 if n is 1 mod 5. Generally a(n) = 162/125*n^3 + O(n^2). - Charles R Greathouse IV, Feb 20 2018
EXAMPLE
For n = 1, let m = floor((6*1+4)/5) = 2, a(1) = (3*2/2)*binomial(2+1,2) = 3*3 = 9.
For n = 2, let m = floor((6*2+4)/5) = 3, a(2) = ((3*3+1)/2)*binomial(3+1,2) = 5*6 = 30.
MATHEMATICA
Select[Array[Floor[(3 # + 1)/2] (# + 1) #/2 &, 58, 0], Divisible[#, 3] &] (* Michael De Vlieger, Feb 17 2018 *)
LinearRecurrence[{1, 0, 0, 0, 3, -3, 0, 0, 0, -3, 3, 0, 0, 0, 1, -1}, {0, 9, 30, 60, 120, 189, 432, 630, 825, 1122, 1404, 2205, 2760, 3264, 3978, 4617, 6300}, 48] (* Robert G. Wilson v, Feb 19 2018 *)
PROG
(PARI) a(n) = my(k=n%5); 162/125*n^3 + if(k==0, 27/25*n^2, k==1, 459/125*n^2 + 396/125*n + 108/125, k==2, 423/125*n^2 + 339/125*n + 84/125, k==3, 297/125*n^2 + 144/125*n + 21/125, 261/125*n^2 + 111/125*n + 12/125) \\ Charles R Greathouse IV, Feb 20 2018
(PARI) concat(0, Vec(3*x*(3 + 7*x + 10*x^2 + 20*x^3 + 23*x^4 + 72*x^5 + 45*x^6 + 35*x^7 + 39*x^8 + 25*x^9 + 33*x^10 + 8*x^11 + 3*x^12 + x^13) / ((1 - x)^4*(1 + x + x^2 + x^3 + x^4)^3) + O(x^60))) \\ Colin Barker, Mar 01 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Justin Gaetano, Feb 13 2018
STATUS
approved