login
Number of compositions (ordered partitions) of n into squares dividing n.
3

%I #22 Oct 30 2017 19:50:07

%S 1,1,1,1,2,1,1,1,7,2,1,1,26,1,1,1,96,1,12,1,345,1,1,1,1252,2,1,76,

%T 4544,1,1,1,17473,1,1,1,127654,1,1,1,217286,1,1,1,788674,2490,1,1,

%U 3182706,2,28,1,10390321,1,14128,1,37713313,1,1,1,136886433,1,1,80396,579739960,1,1,1,1803399103,1,1

%N Number of compositions (ordered partitions) of n into squares dividing n.

%H Alois P. Heinz, <a href="/A294105/b294105.txt">Table of n, a(n) for n = 0..2500</a>

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

%H <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>

%e a(8) = 7 because 8 has 4 divisors {1, 2, 4, 8} among which 2 are squares {1, 4} therefore we have [4, 4], [4, 1, 1, 1, 1], [1, 4, 1, 1, 1], [1, 1, 4, 1, 1], [1, 1, 1, 4, 1], [1, 1, 1, 1, 4] and [1, 1, 1, 1, 1, 1, 1, 1].

%p a:= proc(n) option remember; local b, l;

%p l, b:= select(issqr, numtheory[divisors](n)),

%p proc(m) option remember; `if`(m=0, 1,

%p add(`if`(j>m, 0, b(m-j)), j=l))

%p end; b(n)

%p end:

%p seq(a(n), n=0..50); # _Alois P. Heinz_, Oct 30 2017

%t Table[SeriesCoefficient[1/(1 - Sum[Boole[Mod[n, k] == 0 && IntegerQ[k^(1/2)]] x^k, {k, 1, n}]), {x, 0, n}], {n, 0, 70}]

%Y Cf. A006456, A046951, A100346, A284345.

%K nonn

%O 0,5

%A _Ilya Gutkovskiy_, Oct 28 2017