login
A386361
Number of partitions of n such that the least part occurs exactly (1/4)*(number of parts) times.
2
0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 5, 6, 9, 12, 16, 20, 26, 32, 41, 50, 62, 76, 93, 112, 136, 164, 197, 237, 283, 339, 403, 480, 569, 676, 799, 945, 1113, 1314, 1543, 1815, 2125, 2494, 2912, 3407, 3970, 4632, 5384, 6266, 7268, 8438, 9766, 11310, 13063, 15097, 17402
OFFSET
1,9
PROG
(Ruby)
def partition(n, min, max)
return [[]] if n == 0
[max, n].min.downto(min).flat_map{|i| partition(n - i, min, i).map{|rest| [i, *rest]}}
end
def A(n, k)
cnt = 0
partition(n, 1, n).each{|ary|
cnt += 1 if k * ary.count(ary.min) == ary.size
}
cnt
end
def A386361(n)
(1..n).map{|i| A(i, 4)}
end
p A386361(40)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 19 2025
STATUS
approved