cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A386360 Number of partitions of n such that the least part occurs exactly (1/3)*(number of parts) times.

This page as a plain text file.
%I A386360 #11 Jul 19 2025 10:11:12
%S A386360 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,
%T A386360 198,235,285,337,406,479,574,676,806,948,1124,1318,1557,1822,2147,
%U A386360 2505,2940,3424,4006,4657,5431,6299,7329,8483,9843,11372,13163,15177,17527,20175
%N A386360 Number of partitions of n such that the least part occurs exactly (1/3)*(number of parts) times.
%o A386360 (Ruby)
%o A386360 def partition(n, min, max)
%o A386360   return [[]] if n == 0
%o A386360   [max, n].min.downto(min).flat_map{|i| partition(n - i, min, i).map{|rest| [i, *rest]}}
%o A386360 end
%o A386360 def A(n, k)
%o A386360   cnt = 0
%o A386360   partition(n, 1, n).each{|ary|
%o A386360     cnt += 1 if k * ary.count(ary.min) == ary.size
%o A386360   }
%o A386360   cnt
%o A386360 end
%o A386360 def A386360(n)
%o A386360   (1..n).map{|i| A(i, 3)}
%o A386360 end
%o A386360 p A386360(40)
%Y A386360 Cf. A000005, A239497, A386361.
%Y A386360 Cf. A237825.
%K A386360 nonn
%O A386360 1,7
%A A386360 _Seiichi Manyama_, Jul 19 2025