|
|
A081489
|
|
a(n) = n*(2*n^2 -3*n +7)/6 = C(n, 1) + C(n, 2) + 2*C(n, 3).
|
|
12
|
|
|
1, 3, 8, 18, 35, 61, 98, 148, 213, 295, 396, 518, 663, 833, 1030, 1256, 1513, 1803, 2128, 2490, 2891, 3333, 3818, 4348, 4925, 5551, 6228, 6958, 7743, 8585, 9486, 10448, 11473, 12563, 13720, 14946, 16243, 17613, 19058, 20580, 22181, 23863, 25628
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
First difference is given by A002522 = n^2 + 1. Second difference is odd numbers given by A005408.
With offset 0, this is the binomial transform of (0,1,1,2,0,0,0,...). - Paul Barry, Jul 03 2003
a(n) = sum of first (n-1) squares + n; e.g., a(5) = 35 = (1 + 4 + 9 + 16 + 5). - Gary W. Adamson, Aug 27 2010
Equals the number of functions from {1,2,...,n} to {1,2,...,n} that occur as compositions of U(x) = min{x+1,n} and D(x) = max{x-1,1}, including the identity function (the empty composition). Problem 11901 in The American Mathematical Monthly, volume 123, page 399, April 2016), proposed by Don Knuth, asked for the count of such functions (solution submitted to Monthly by Jerrold W. Grossman and Serge Kruk, August 21, 2016). - Jerrold Grossman, Aug 21 2016
|
|
LINKS
|
|
|
FORMULA
|
a(n) = n*(2*n^2 -3*n +7)/6 = C(n, 1) + C(n, 2) + 2*C(n, 3). - Paul Barry, Jul 03 2003
E.g.f.: exp(x)*(x +x^2/2 +x^3/3).
|
|
MAPLE
|
with(combinat):a:=n->sum(fibonacci(3, i), i=0..n): seq(a(n), n=0..42); # Zerinvary Lajos, Mar 20 2008
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) my(x='x+O(x^50)); Vec(serlaplace(exp(x)*(x+x^2/2+x^3/3)))
(Magma) I:=[1, 3, 8, 18]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Feb 28 2014
(Sage) [n*(2*n^2-3*n+7)/6 for n in (1..50)] # G. C. Greubel, Aug 13 2019
(GAP) List([1..50], n-> n*(2*n^2-3*n+7)/6); # G. C. Greubel, Aug 13 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 29 2003
|
|
STATUS
|
approved
|
|
|
|