OFFSET
1,6
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
FORMULA
The g.f. for "consecutive parts that differ by d" is Sum_{k>=1} x^(k*(d*k-d+2)/2) / (1-x^k); cf. A117277. - Joerg Arndt, Nov 30 2020
EXAMPLE
For n = 28 there are three partitions of 28 into consecutive parts that differ by 4, including 28 as a valid partition. They are [28], [16, 12] and [13, 9, 5, 1]. So a(28) = 3.
MATHEMATICA
nmax = 105;
col[k_] := col[k] = CoefficientList[Sum[x^(n(k n - k + 2)/2 - 1)/(1 - x^n), {n, 1, nmax}] + O[x]^nmax, x];
a[n_] := col[4][[n]];
Array[a, nmax] (* Jean-François Alcover, Nov 30 2020 *)
Table[Sum[If[n > 2*k*(k-1), 1, 0], {k, Divisors[n]}], {n, 1, 100}] (* Vaclav Kotesovec, Oct 22 2024 *)
PROG
(PARI) seq(N, d)=my(x='x+O('x^N)); Vec(sum(k=1, N, x^(k*(d*k-d+2)/2)/(1-x^k)));
seq(100, 4) \\ Joerg Arndt, May 05 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, May 01 2020
STATUS
approved