login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of compositions (ordered partitions) of n into heptagonal numbers (A000566).
7

%I #9 Dec 28 2018 20:49:51

%S 1,1,1,1,1,1,1,2,3,4,5,6,7,8,10,13,17,22,29,37,46,57,71,89,112,143,

%T 183,233,295,372,468,588,741,937,1188,1506,1908,2414,3049,3848,4857,

%U 6136,7757,9812,12414,15702,19852,25089,31703,40061,50631,64004,80923,102318

%N Number of compositions (ordered partitions) of n into heptagonal numbers (A000566).

%H Alois P. Heinz, <a href="/A322799/b322799.txt">Table of n, a(n) for n = 0..9828</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HeptagonalNumber.html">Heptagonal Number</a>

%H <a href="/index/Com#comp">Index entries for sequences related to compositions</a>

%F G.f.: 1/(1 - Sum_{k>=1} x^(k*(5*k-3)/2)).

%p h:= proc(n) option remember; `if`(n<1, 0, (t->

%p `if`(t*(5*t-3)/2>n, t-1, t))(1+h(n-1)))

%p end:

%p a:= proc(n) option remember; `if`(n=0, 1,

%p add(a(n-i*(5*i-3)/2), i=1..h(n)))

%p end:

%p seq(a(n), n=0..60); # _Alois P. Heinz_, Dec 28 2018

%t nmax = 53; CoefficientList[Series[1/(1 - Sum[x^(k (5 k - 3)/2), {k, 1, nmax}]), {x, 0, nmax}], x]

%Y Cf. A000566, A006456, A023361, A181324, A279012, A279280, A322798, A322800.

%K nonn

%O 0,8

%A _Ilya Gutkovskiy_, Dec 26 2018