OFFSET
0,4
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 0..8000 (terms 0..2000 from Alois P. Heinz)
FORMULA
G.f.: Sum_{i>=0} x^(i*(i+1)/2) / Product_{j=1..i*(i+1)/2} (1 - x^j). - Ilya Gutkovskiy, May 07 2017
EXAMPLE
For example there are 7 unrestricted partitions of 5, namely: 5, 4+1, 3+2, 3+1+1, 2+2+1, 2+1+1+1 and 1+1+1+1+1. Of these we allow only those with 1,3,6,10,... parts. These are 5, 3+1+1 and 2+2+1. So a(5)=3.
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0 or i=1, `if`(issqr(
1+8*(t+n)), 1, 0), b(n, i-1, t)+b(n-i, min(i, n-i), t+1))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..80); # Alois P. Heinz, Jul 29 2017
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[n == 0 || i == 1, If[Sqrt[1 + 8(t + n)] // IntegerQ, 1, 0], b[n, i - 1, t] + b[n - i, Min[i, n - i], t + 1]];
a[n_] := b[n, n, 0];
a /@ Range[0, 80] (* Jean-François Alcover, Nov 11 2020, after Alois P. Heinz *)
PROG
(Sage) A178927 = lambda n: 1 if n == 0 else sum(number_of_partitions(n, k=tri) for tri in [1..n] if is_triangular_number(tri)) # [D. S. McNeil, Dec 30 2010]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David S. Newman, Dec 29 2010
STATUS
approved