|
|
A057568
|
|
Number of partitions of n where n divides the product of the parts.
|
|
30
|
|
|
1, 1, 1, 2, 1, 2, 1, 6, 5, 5, 1, 22, 1, 11, 23, 80, 1, 113, 1, 150, 85, 45, 1, 737, 226, 84, 809, 726, 1, 1787, 1, 4261, 735, 260, 1925, 9567, 1, 437, 1877, 16402, 1, 14630, 1, 9861, 33057, 1152, 1, 102082, 19393, 57330, 10159, 30706, 1, 207706, 47927, 200652
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
LINKS
|
|
|
EXAMPLE
|
The a(1) = 1 through a(9) = 5 partitions are the following. The Heinz numbers of these partitions are given by A326149.
(1) (2) (3) (4) (5) (6) (7) (8) (9)
(22) (321) (44) (63)
(422) (333)
(2222) (3321)
(4211) (33111)
(22211)
(End)
|
|
MAPLE
|
b:= proc(n, i, t) option remember; `if`(n=0,
`if`(t=1, 1, 0), `if`(i<1, 0, b(n, i-1, t)+
`if`(i>n, 0, b(n-i, min(i, n-i), t/igcd(i, t)))))
end:
a:= n-> `if`(isprime(n), 1, b(n$3)):
|
|
MATHEMATICA
|
Table[Length[Select[IntegerPartitions[n], Divisible[Times@@#, n]&]], {n, 20}] (* Gus Wiseman, Jul 04 2019 *)
b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[t == 1, 1, 0], If[i < 1, 0, b[n, i - 1, t] + If[i > n, 0, b[n - i, Min[i, n - i], t/GCD[i, t]]]]];
a[n_] := If[PrimeQ[n], 1, b[n, n, n]];
|
|
PROG
|
(Scheme)
;; This is a naive algorithm that scans over all partitions of each n. For fold_over_partitions_of see A000793.
(define (A057568 n) (let ((z (list 0))) (fold_over_partitions_of n 1 * (lambda (partprod) (if (zero? (modulo partprod n)) (set-car! z (+ 1 (car z)))))) (car z)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|