|
|
A127736
|
|
a(n) = n*(n^2 + 2*n - 1)/2.
|
|
10
|
|
|
1, 7, 21, 46, 85, 141, 217, 316, 441, 595, 781, 1002, 1261, 1561, 1905, 2296, 2737, 3231, 3781, 4390, 5061, 5797, 6601, 7476, 8425, 9451, 10557, 11746, 13021, 14385, 15841, 17392, 19041, 20791, 22645, 24606, 26677, 28861, 31161, 33580, 36121, 38787, 41581
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
For n > 0, a(n) is the number of compositions of n+10 into n parts avoiding parts 2 and 3. - Milan Janjic, Jan 07 2016
Sum of the numbers in the top row and last column of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows (see example). - Wesley Ivan Hurt, May 18 2021
|
|
LINKS
|
|
|
FORMULA
|
Row sums of triangle A134390. Also, binomial transform of [1, 6, 8, 3, 0, 0, 0, ...). - Gary W. Adamson, Oct 23 2007
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: -x*(x^2-3*x-1) / (x-1)^4. (End)
|
|
EXAMPLE
|
Add all the numbers in the top row and last column.
[1 2 3 4 5]
[1 2 3 4] [6 7 8 9 10]
[1 2 3] [5 6 7 8] [11 12 13 14 15]
[1 2] [4 5 6] [9 10 11 12] [16 17 18 19 20]
[1] [3 4] [7 8 9] [13 14 15 16] [21 22 23 24 25]
------------------------------------------------------------------------
n 1 2 3 4 5
------------------------------------------------------------------------
a(n) 1 7 21 46 85
------------------------------------------------------------------------
(End)
|
|
MAPLE
|
|
|
MATHEMATICA
|
CoefficientList[Series[-(x^2 - 3 x - 1)/(x - 1)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Mar 14 2014 *)
LinearRecurrence[{4, -6, 4, -1}, {1, 7, 21, 46}, 60] (* Harvey P. Dale, Apr 22 2014 *)
|
|
PROG
|
(PARI) Vec(-x*(x^2-3*x-1)/(x-1)^4 + O(x^100)) \\ Colin Barker, Mar 12 2014
(PARI) a(n) = n*(n^2+2*n-1)/2; \\ Altug Alkan, Jan 07 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|