# Questions tagged [math]

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

1,599 questions
Filter by
Sorted by
Tagged with
2k views

### Digit small numbers

A digit small number is a positive integer $n$ such for any two numbers that multiply to $n$, their total number of digits is more than the digits in $n$. In otherwords: there are no two ...
1k views

### Infinite ordinals from a well-ordering

Your task is to write a short program that represents a large (infinite) ordinal, using a well-ordering of the set of positive integers. Your program will take two different positive integers and ...
99 views

### When the result will reach the people? [closed]

Assume the result of an exam has been published. After 5 minutes, First person knows the result. In next 5 minutes, new 8 persons know the result, and in total 9 know it. Again after 5 minutes, new 27 ...
966 views

### Bijective meets mixed base

Background A bijective base $b$ numeration, where $b$ is a positive integer, is a bijective positional notation that makes use of $b$ symbols with associated values of $1,2,\cdots,b$. ...
1k views

### Find the k-th order summary of a number

Background The summary of a non-negative integer $n$ is the concatenation of all digits that appear in $n$ in increasing order, with each digit being preceded by the number of times it appears in \...
2k views

### How long is the number in this base?

Given a positive integer $n$ and another positive integer $b$ ($1 < b < 36$), return the number of digits/length of $n$ in base $b$ ...
2k views

### Bird's Algorithm for Computing Determinants

There is a division-free algorithm for computing determinants published by R.S.Bird in 2011 that uses only matrix multiplications. Given a $n×n$ matrix $X$, the matrix $Y=μ(X)$ is another $n×n$...
78 views

### Make me equal to 24 [duplicate]

Based on this game. Description : Based on Wikipedia's description. The 24 Game is an arithmetical card game in which the objective is to find a way to manipulate four integers so that the end result ...
567 views

### Solve linear equations over the integers

All variables in this question are integer valued. Input 4 integers w, x, y, z. They can be positive or negative and will be less than 1048576 in absolute value. Output The general solution to the ...
1k views

### Fibonacci-like gap formula

Background The recurrence of the Fibonacci sequence is defined as $$f(n+2) = f(n+1) + f(n)$$ From this recurrence alone, the following gap formulae (recurrences relating three terms with certain ...
2k views

### Inverse n-bonacci sequence

We all know about the Fibonacci sequence. We start with two 1s and keep getting the next element with the sum of previous two elements. n-bonacci sequence can be defined in similar way, we start with <...
2k views

### Find the smallest solution for this simple equation

Input 4 integers w, x, y, z from the range -999 to 999 inclusive where none of the values is 0. Output 4 integers a, b, c, d so that aw + bx + cy + dz == 0 where none of the values is 0. Restrictions ...
1k views

### Self-referential triangle sequence

Output the flattened version of the sequence A297359, which starts like the following: ...
3k views

### Make S + S + ... + S as Large as Possible!

Let $S \subset \mathbb N_{\geq0}$ be a subset of the nonnegative integers, and let $$S^{(k)} = \underbrace{S + S + \dots + S}_{k\ \textrm{times}} = \{ a_1 + a_2 + \dots + a_k : a_i \in S\}.$$ For ...
1k views

### How many values of this type?

Background The number of values for a given type is called the cardinality of that type, and that of type T is written as |T|. Haskell and a few other languages ...
583 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). ...
2k views

### ∀ a b. a + b = b + a

This question is a part of the lean LotM. A ring is a type of structure that takes the rules of addition and multiplication we are familiar with and abstracts them, so we can reason about them. To do ...
2k views

### The Area of Rectangles

Getting the area covered by a rectangle is really easy; just multiply its height by its width. However in this challenge we will be getting the area covered by multiple rectangles. This is equally ...
3k views

### Implement the hyperfactorial

The objective Given the non-negative integer $n$, output the value of the hyperfactorial $H(n)$. You don't have to worry about outputs exceeding your language's integer limit. Background The ...
539 views

### Multiplication for geometric algebra

The basis vectors for geometric algebra are $$(e_0=1), e_1, e_2,\dots,e_n$$ They all square to 1 (we do not consider vectors which square to -1 or zero) $$e_i \cdot e_i = 1$$ They are associative and ...
165 views

### Pythagoras' Golfing Grid [closed]

Recently, I created a binary word search that got me working with grids. It was fun, so I wanted to create some more similar content. Meet Pythagoras' Golfing grid: Each of ...
796 views

### Written Word Equation

Word equations, but not as you know it! Given a sentence which will include two numbers, numerically, and a spelt operator, in the order seen in the examples, your goal is to give the numerical answer ...
708 views

### Yet another coin flipping problem

Problem Starting with a set of 10 coins at the start where all coins are tails up, and given n number of integers $x_1, x_2, x_3... x_n$ representing n rounds of coin flipping. At each round, we ...
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 ...
666 views

### Generate all $3\times 3$ magic squares

Though challenges involving magic squares abound on this site, none I can find so far ask the golfer to print / output all normal magic squares of a certain size. To be clear, a normal magic square of ...
926 views

### Boustrophedon transform

Related: Boustrophedonise, Output the Euler Numbers (Maybe a new golfing opportunity?) Background Boustrophedon transform (OEIS Wiki) is a kind of transformation on integer sequences. Given a sequence ...
481 views

### Is this an interval graph?

Background An interval graph (Wikipedia, MathWorld, GraphClasses) is an undirected graph derived from a set of intervals on a line. Each vertex represents an interval, and an edge is present between ...
230 views

### Bijection between $\mathbb N$ and at-most-$n$-ary trees

Background Related: a golflang theory I posted in TNB a while ago At-most-$n$-ary trees are rooted trees where each internal node has between 1 and $n$ children (inclusive). Two trees are ...
551 views

### Maximal hexagonal dot pattern

Challenge Imagine a hexagonal grid as shown below. Let's call such a grid has size $n$ if it has $n$ dots on one side. The following is one of size 3: ...
252 views

### Flatten a parabola keeping the distances between points along the curve constant

Background Math SE's HNQ How to straighten a parabola? has 4,000+ views, ~60 up votes, 16 bookmarks and six answers so far and has a related companion HNQ in Mathematica SE How to straighten a curve? ...
215 views

215 views

### Minkowski sum of two convex polygons

Background Minkowski addition is a binary operation on two sets of points (usually geometric objects) in the Euclidean space. The Minkowski sum of two sets $A$ and $B$ is formally defined as ...
Background Binomial transform is a transform on a finite or infinite integer sequence, which yields another integer sequence. The binomial transform of a sequence $\{a_n\}$ is given by s_n = \sum_{...
Consider a binary operator $*$ that operates on a set $S$. For simplicity's sake, we'll assume that $*$ is closed, meaning that its inputs and outputs are always members of $S$. This means ...