login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of partitions of n into squares dividing n.
8

%I #6 Mar 30 2017 09:30:15

%S 1,1,1,1,2,1,1,1,3,2,1,1,4,1,1,1,6,1,3,1,6,1,1,1,7,2,1,4,8,1,1,1,15,1,

%T 1,1,27,1,1,1,11,1,1,1,12,6,1,1,28,2,3,1,14,1,7,1,15,1,1,1,16,1,1,8,

%U 46,1,1,1,18,1,1,1,114,1,1,4,20,1,1,1,66,11,1,1,22,1,1,1,23,1,11,1,24,1,1,1,91,1,3,12,67

%N Number of partitions of n into squares dividing n.

%H Alois P. Heinz, <a href="/A284345/b284345.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Par#partN">Index entries for related partition-counting sequences</a>

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

%F a(n) = [x^n] Product_{d^2|n} 1/(1 - x^(d^2)).

%F a(n) = 1 if n is a squarefree.

%F a(n) = 2 if n is a square of prime.

%e a(8) = 3 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] and [1, 1, 1, 1, 1, 1, 1, 1].

%p with(numtheory):

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

%p sort(select(issqr, [divisors(n)[]])),

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

%p b(m, i-1)+`if`(l[i]>m, 0, b(m-l[i], i))))

%p end; b(n, nops(l))

%p end:

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

%t Join[{1}, Table[d = Divisors[n]; Coefficient[Series[Product[1/(1 - Boole[Mod[DivisorSigma[0, d[[k]]], 2] == 1] x^d[[k]]), {k, Length[d]}], {x, 0, n}], x, n], {n, 1, 100}]]

%Y Cf. A000290, A001156, A018818, A046951, A066882, A161148, A225244, A284289.

%K nonn

%O 0,5

%A _Ilya Gutkovskiy_, Mar 25 2017