login
A239519
a(n) = n + (n-1)*(n-2) + (n-3)*(n-4)*(n-5) + (n-6)*(n-7)*(n-8)*(n-9) + ... + ...*1.
0
0, 1, 3, 5, 11, 19, 32, 62, 112, 191, 316, 558, 988, 1711, 2864, 4661, 7703, 12883, 21626, 35989, 58826, 94217, 150017, 239047, 382676, 614425, 984452, 1565021, 2458810, 3826746, 5918938, 9136603, 14115710, 21842345, 33804340, 52186061, 80128082, 122221802
OFFSET
0,3
COMMENTS
In other words, write n,n-1,n-2,...,n-k,...,1 and place '+' before the terms n-k, where k is triangular, place '*' elsewhere, then a(n) = result. - Ralf Stephan, Mar 29 2014
EXAMPLE
a(2) = 2 + 1 = 3.
a(3) = 3 + 2*1 = 5.
a(9) = 9 + 8*7 + 6*5*4 + 3*2*1 = 191.
a(10) = 10 + 9*8 + 7*6*5 + 4*3*2*1 = 316.
PROG
(Python)
for n in range(55):
sum = i = 0
k = 1
while i<n:
product = 1
for x in range(k):
product *= n - i
i += 1
if i>=n: break
sum += product
k += 1
print str(sum)+', ',
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Mar 20 2014
STATUS
approved