OFFSET
1,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,0,0,0,0,1,-2,1).
FORMULA
a(n) = floor(s*t/(s+t)) where s = A000290(n) = n^2, t = A000217(n) = n*(n+1)/2. a(n) = floor((n^3+n^2) / (3*n+1)).
G.f.: (-x^10 + 2*x^9 - x^8 + 2*x^7 + x^5 + x^3 + x^2 + x)/((1-x)^2*(1-x^9)). - Ralf Stephan, Jan 15 2014
MATHEMATICA
With[{nn=60}, Floor[Times@@#/Total[#]]&/@Thread[{Range[nn]^2, Accumulate[ Range[ nn]]}]] (* or *) LinearRecurrence[{2, -1, 0, 0, 0, 0, 0, 0, 1, -2, 1}, {0, 1, 3, 6, 9, 13, 17, 23, 28, 35, 42}, 60] (* Harvey P. Dale, Oct 07 2015 *)
PROG
(Python)
for n in range(1, 99):
s = n*n
t = n*(n+1)/2
print str(s*t//(s+t))+', ',
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Jan 05 2014
STATUS
approved