# Questions tagged [math]

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

607 questions
Filter by
Sorted by
Tagged with
3k views

### Calculate Standard Deviation

Challenge Given a list of numbers, calculate the population standard deviation of the list. Use the following equation to calculate population standard deviation: Input The input will a list of ...
• 23.3k
2k views

### Sum the diagonals

Take a matrix of positive integers as input, and output the individual sums of the elements on the diagonal lines through the matrix. You shall only count the lines that goes diagonally down and to ...
• 46.2k
5k views

### Implement Rijndael's S-box

Rijndael's S-box is a frequently used operation in AES encryption and decryption. It is typically implemented as a 256-byte lookup table. That's fast, but means you need to enumerate a 256-byte ...
• 20.8k
3k views

### Calculate Landau's function

Landau's function $g(n)$ (OEIS A000793) gives the maximum order of an element of the symmetric group $S_n$. Here, the order of a permutation $\pi$ is the smallest positive integer $k$ such ...
• 1,381
2k views

### Verify Eigenpairs

In this challenge, you will be given a square matrix A, a vector v, and a scalar λ. You will ...
• 41.3k
5k views

### Convince me Gabriel's Horn is possible

From Wikipedia, Gabriel's Horn is a particular geometric figure that has infinite surface area but finite volume. I discovered this definition in this Vsauce's video (starting at 0:22) where I took ...
• 1,219
688 views

### Thar she blows!

Arrr... Ahoy there, me maties! Unfurl tha' mainsail! Full to starboard! Ah, feel th' wind in yer hair! Right, me hearties... I be needin' a bit of yer codin' skills! Me crew are a li'l more ...
• 7,493
1k views

### Output N in base -10

Challenge: In the programming language of your choice, accept an integer as input in base 10, and output it in the negadecimal notation, which is also known as base -10 Example algorithm: This is ...
• 3,062
816 views

### Lean golf: Pascal vs. Fibonacci

The Pascal's triangle and the Fibonacci sequence have an interesting connection: Source: Math is Fun - Pascal's triangle Your job is to prove this property in Lean theorem prover (Lean 3 + mathlib). ...
• 73.8k
3k views

### Implement the Torian

The Torian, $x!x$, of a non-negative integer $x$ can be recursively defined as $$x!0 = x \\ x!n = \prod^x_{i=1} i!(n-1) = 1!(n-1) \times 2!(n-1) \times \cdots \times x!(n-1)$$ The Torian is then ...
• 49.5k
2k views

### What's next, Achilles?

Powerful numbers are positive integers such that, when expressed as a prime factorisation: $$a = p_1^{e_1} \times p_2^{e_2} \times p_3^{e_3} \cdots \times p_k^{e_k}$$ all exponents $e_1, e_2, ...$ ...
• 49.5k
529 views

### Locally invert a Polynomial

Challenge Given a polynomial $p$ with real coefficients of order $1$ and degree $n$, find another polynomial $q$ of degree at most $n$ such that $(p∘q)(X) = p(q(X)) \equiv X \mod X^{n+1}$, ...
• 43.7k
2k views

### Triangle Area Side Side Side [closed]

Given three sides of a triangle, print area of this triangle. Test cases: In: 2,3,4 Out: 2.90473750965556 In: ...
• 1,286
1k views

### (RGS 4/5) Inverting matrices modulo m

Task Given an integer matrix M and a modulus m, find an inverse of M modulo ...
• 14k
2k views

### Print the tetration

Tetration, represented as ${}^ba$, is repeated exponentiation. For example, ${}^32$ is $2^{2^2}$, which is $16$. Given two numbers $a$ and $b$, print ${}^ba$. Test cases ...
• 10.6k
995 views

### Kolakoski-like self-referencing sequences

This is how the Kolakoski sequence (OEIS A000002) is defined: The Kolakoski sequence is a sequence that contains 1 and 2, and ...
• 40.5k
2k views

### Hypercube elements

Write a function or program that outputs the number of each type of element (vertex, edge, face, etc.) of an N-dimensional hypercube. As an example, the 3 dimensional cube has 1 cell (i.e. 1 3-...
• 38.4k
2k views

### Laver table computations and an algorithm that is not known to terminate in ZFC

The Laver tables provide examples of programs which have not been shown to terminate in the standard axiomatic system of mathematics ZFC but which do terminate when one assumes very large cardinal ...
1k views

### Output diagonal positions of me squared

Given a number n, Output an ordered list of 1-based indices falling on either of the diagonals of an n*n square matrix. ...
• 3,398
2k views

### Find numbers within the Copeland–Erdős constant

Background The Copeland–Erdős constant is the concatenation of "0." with the base 10 representations of the prime numbers in order. Its value is ...
• 104k
649 views

### Convert between balanced bases!

Balanced bases: Balanced bases are essentially the same as normal bases, except that digits can be positive or negative, while in normal bases digits can only be positive. From here on, balanced ...
• 6,982
1k views

### How long does it take to paint a stick?

(Based on this Math.SE problem, which also provides some graphics) I have a stick which looks kinda like this: I want it to look kinda like this: I'm not an expert painter, however, so before I ...
• 29k
1k views

### Jordan Decomposition

Important note: Because this challenge only applies to square matrices, any time I use the term "matrix", it is assumed that I am referring to a square matrix. I am leaving off the "...
555 views

• 279