Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

# Questions tagged [integer-partitions]

For challenges related to the different ways of expressing an integer as a sum of positive integers.

49 questions
Filter by
Sorted by
Tagged with
2k views

### There's more than one way to skin a set

Given a set of positive integers $S$, output the set of all positive integers $n$ such that $n$ can be made by summing a subset of $S$ in more than one different way, i.e., that are ...
• 18.7k
380 views

### Split given integer into a given number of integers, each within given bounds

Input variables: (Names are just examples, they don't need to be named like this) GrandTotal - integer to divide SplitCount - ...
474 views

### Mirror an integer... in NDos' way

NDos' Numeral System NDos' numeral system is a numeral system invented by me. It represents every nonnegative integer by a binary tree. Given a nonnegative integer $n$: If $n=0$, it is ...
• 4,163
2k views

### 1 bit, 2 bits, 3 bits, …

Given a positive integer $n$, your task is to find out the number of partitions $a_1+a_2+\dots+a_k=n$ where each $a_j$ has exactly $j$ bits set. For instance, there are $6$ such partitions ...
• 166k
779 views

### AoCG2021 Day 14: Adjusting dancing program's period

Part of Advent of Code Golf 2021 event. See the linked meta post for details. Related to AoC2017 Day 16. I'm using the wording from my Puzzling SE puzzle based on the same AoC challenge instead of the ...
• 62.1k
1k views

### Minimally prepend numbers to get a symmetric Young diagram

Background A Young diagram is a diagram that represents a nonincreasing sequence of positive integers using left-justified rows of squares. As an example, 5, 4, 1 ...
• 62.1k
927 views

### Non-sums of distinct positive powers

There are 31 positive integers that cannot be expressed as the sum of 1 or more distinct positive squares: ...
2k views

### Display a number in Toki Pona

Toki Pona is a constructed language with 137ish words, designed to constrain the speaker to expressing ideas in a simple and straightforward manner, reducing ideas to more essential forms. Often, ...
• 381
1k views

### List array elements which can be summed from other elements

Consider an array of unique integers, with an arbitrary length greater than 2. It is sometimes possible to express elements of the array as the sum of at least two other elements. For example, if our ...
• 323
3k views

### Number of coins needed to make change

Relatable scenario: I'm going to the store to buy a single item, but only have a $100k bill. As a result, I need exactly$99,979 in change, and in the fewest coins/bills possible because I'm quite ...
• 17.1k
1k views

1k views

### Hook length product

A Young diagram is an arrangement of boxes in left-justified rows and top-justified columns. For each box, all the spaces above it and to its left are occupied. ...
• 137k
4k views

### Fissile Numbers

I found this sequence while working on Evolution of OEIS, but never got around to posting it as an answer. After writing a reference implementation in Mathematica, I thought this is a fun exercise to ...
• 193k
3k views

### Build an ASCII Fibonacci Clock

Someone built a really fancy clock using Fibonacci numbers, which looks really nice but is fairly unusable. Just the way we like it! Let's recreate this. The clock is made up of 5 sections ...
• 193k
2k views

### Random Golf of the Day #3: Integer Partitions

About the Series First off, you may treat this like any other code golf challenge, and answer it without worrying about the series at all. However, there is a leaderboard across all challenges. You ...
• 193k
566 views

### Nearest partition numbers

The number of partitions of an integer is the number of ways that integer can be represented as a sum of positive integers. For example: ...
• 2,181
1k views

### Darts meets Codegolf

I think everyone is familiar with the game of darts. For those that don't understand the scores, here is a useful link. The board A dartboard can be compared to a pie cut in 20 pieces. Each piece is ...
• 2,609
1k views

### Compute the number of ways how you can express a number as a sum [closed]

For a given natural number n, compute the number of ways how one can express n as a sum of positive natural numbers. For example,...
• 4,352
3k views

### The minimum fibonacci challenge!

Challenge In this task you would be given an integer N (less than 106), find the minimum way in which you could sum to N using only Fibonacci numbers - this partition is called Zeckendorf ...
• 2,289