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.

Showing 1-1 of 1 results.

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

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Jul 19 2025

Keywords

Crossrefs

Programs

  • 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)
Showing 1-1 of 1 results.