# Questions tagged [math]

The challenge involves mathematics in some central way. Also consider using more specific tags, listed in the tag wiki info.

1,774 questions
Filter by
Sorted by
Tagged with
0 votes
10 answers
336 views

### Print 100 digits of Champernowne's Constant

Inspired by this and this question Challenge Your challenge is to print any 100 consecutive digits of Champernowne's Constant. You must give the index at which that subsequence appears. The 0 at the ...
• 167
13 votes
14 answers
1k views

### What's the character limit of this text field?

Someone I know has no coding experience, but has proposed an algorithm* to determine the character limit of text fields they find online. They copy a string containing the numbers from 1 to 1,000 ...
• 643
9 votes
6 answers
1k views

### Night hike partitioning

We want to go on a night hike with the youth group, but of course not everyone has their torch, even though we told them we planned to split up. What options are there for group formation if n teens ...
• 1,911
16 votes
16 answers
4k views

### Which skill to train?

Story (skip, if you prefer the naked task): You need five skills for an imaginary sport: Speed, strength, endurance, accuracy and tactics. If you achieve a score in each of these disciplines, you can ...
• 1,911
4 votes
1 answer
193 views

### Convert real numbers between factoradic and positive integer bases

This prompt asked you to convert back and forth to factoradic, but is very limited in scope (only decimal integers from 0 to 10!-1). Your task in this challenge is to reach just a bit further and ...
• 179
1 vote
0 answers
132 views

### Produce a secure block cipher round function (1 bit round key; 7 bit message)

We need to produce a block cipher round function with a 1 bit round key size and a 7 bit message size with the highest level of cryptographic security according to our measure of security. ...
9 votes
8 answers
659 views

### Produce the shortest suffix for an (almost) arbitrary string

I encountered some silly code from a game and I figured this would actually turn into a fun golfing problem, so: Given any ASCII string in the limited char range specified below. Append as few ...
• 199
12 votes
6 answers
2k views

### Sine using square root [closed]

Given input $x \in \left\{0,3,6,...,90\right\}$, output $\sin\left(x°\right)$ using integer and $+ - \times \div ( ) \sqrt{\cdot}$(square root), e.g. $\sin(45°)=\sqrt{1\div 2}$. Flexible ...
• 20.7k
17 votes
14 answers
2k views

• 9,712
10 votes
13 answers
2k views

### Decimalize a Fraction

Preamble A common pain-point when working with rational numbers and decimals is how infrequently one can represent their rational number as a clean, non-repeating decimal. Let's solve this by writing ...
• 10.7k
23 votes
14 answers
2k views

### Sum of consecutive nth powers

Related. Given a positive integer $n$, output all integers $b$ (such that $1<b<n-1$) where $n$ can be written as the sum of any number of consecutive powers of $b$. Example: Let's say \...
• 771
11 votes
20 answers
4k views

### Add two really big numbers

Preamble We've already proven we're good at adding two numbers, but many solutions only operate on tiny numbers like 2³²-1, honestly we can do a lot better. The Challenge Given two unsigned, non-...
• 10.7k
10 votes
6 answers
953 views

### Calculate the Distance to a Line Segment

The Challenge Given two vertexes and a point calculate the distance to the line segment defined by those points. This can be calculated with the following psudocode ...
• 10.7k
12 votes
4 answers
439 views

### Zeckendorf to F(4k+2) representation

Background Fibonacci numbers are defined as follows: $$F_0 = 0, F_1 = 1, F_n = F_{n-1} + F_{n-2}$$ The Zeckendorf representation is a representation of positive integers as a sum of one or more non-...
• 73.8k
20 votes
9 answers
2k views

### Cutting a Circular Pizza Vertically

Most people would cut circular pizzas into circular sectors to divide them up evenly, but it's also possible to divide them evenly by cutting them vertically like so, where each piece has the same ...
• 3,650
16 votes
15 answers
1k views

### Find separating sets

Two points pand q in a topological space can be separated if there are open sets U and ...
• 5,825
21 votes
18 answers
2k views

### Is this set laminar?

A family of sets is called laminar if for any two sets $A$ and $B$ in the family one of the following is true: $A \subseteq B$ $A \supseteq B$ $A \cap B = \emptyset$ Or less ...
• 5,825
9 votes
5 answers
798 views

### Compute the logarithm of a matrix

There have already been challenges about computing the exponential of a matrix , as well as computing the natural logarithm of a number. This challenge is about finding the (natural) logarithm of ...
• 5,825
15 votes
7 answers
1k views

### Solve quadratic equations when 1+1=0

There already have been multiple challenges about carryless multiplication, this challenge will work with the same calculation rules. You task is given a quadratic polynomial ...
• 5,825
17 votes
22 answers
2k views

21 votes
7 answers
1k views

### How many sorting networks?

Below on the left is a picture of a sorting network that can sort 4 inputs. On the right you can see it sorting the input 3,2,4,1. A sorting network of size ...
• 7,828