OFFSET
1,2
COMMENTS
See A185787.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1)
FORMULA
a(n) = (n-1)*(7*n^2 - 11*n + 6)/6. - Corrected by Manfred Arens, Mar 11 2016
G.f.: x^2*(2+4*x+x^2) / (x-1)^4 . - R. J. Mathar, Aug 23 2012
EXAMPLE
Start from
1.....2....4.....7...11...16...22...29...
3.....5....8....12...17...23...30...38...
6.....9...13....18...24...31...39...48...
10...14...19....25...32...40...49...59...
15...20...26....33...41...50...60...71...
21...27...34....42...51...61...72...84...
28...35...43....52...62...73...85...98...
Block out all terms starting at and below the main diagonal then sum up the remaining terms.
.....2.....4.....7...11...16...22...29...
...........8....12...17...23...30...38...
................18...24...31...39...48...
.....................32...40...49...59...
..........................50...60...71...
...............................72...84...
....................................98...
MATHEMATICA
f[n_, k_]:=n+(n+k-2)(n+k-1)/2;
s[k_]:=Sum[f[n, k], {n, 1, k-1}];
Factor[s[k]]
Table[s[k], {k, 1, 70}]
Table[(n - 1)*(7*n^2 - 11*n + 6)/6, {n, 1, 50}] (* G. C. Greubel, Jul 12 2017 *)
PROG
(PARI) for(n=1, 50, print1((n-1)*(7*n^2 - 11*n + 6)/6, ", ")) \\ G. C. Greubel, Jul 12 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Feb 03 2011
STATUS
approved