login
A386360
Number of partitions of n such that the least part occurs exactly (1/3)*(number of parts) times.
2
0, 0, 0, 0, 1, 1, 2, 3, 4, 6, 8, 10, 13, 17, 21, 27, 33, 41, 50, 63, 75, 93, 111, 136, 163, 198, 235, 285, 337, 406, 479, 574, 676, 806, 948, 1124, 1318, 1557, 1822, 2147, 2505, 2940, 3424, 4006, 4657, 5431, 6299, 7329, 8483, 9843, 11372, 13163, 15177, 17527, 20175
OFFSET
1,7
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 A386360(n)
(1..n).map{|i| A(i, 3)}
end
p A386360(40)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 19 2025
STATUS
approved