# Questions tagged [math]

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

1,652 questions
Filter by
Sorted by
Tagged with
44 views

### Find the distance between 2 points in a 3d space (x,y,z) [duplicate]

Your challenge is to create the shortest code that can achieve the above problem given 6 coordinates (x1,y1,z1) (x2,y2,z2) In python 3, this can be used: (i think im correct hopefully) ...
780 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 ...
736 views

1k views

### Compare positions of integers in this sequence

A001057 is one way to represent an integer as a natural number. It lists them according to the following pattern: 0, 1, -1, 2, -2, 3, -3, 4, -4, ... In this ...
2k views

### Third Stirling numbers of the second kind

$\left\{ n \atop k \right\}$ or $S(n, k)$ is a way of referring to the Stirling numbers of the second kind, the number of ways to partition a set of $n$ items into $k$ non-empty subsets. For ...
324 views

### Hexagonal section numbers

Introduction Let's draw some regular hexagons formed by hexagonal tiles, marking the vertices of the tiles with dots. Then we will count the number of dots. ...
2k views

1 vote
195 views

### Chasing the car [closed]

Imagine you are sitting at a park. Suddenly your car gets hijacked and being driven in different directions. Here are the directions, arrows show which direction goes towards where: ...
606 views

### To raise $e$ to the power of a matrix

Inspired by this 3Blue1Brown video Given a square matrix $M$, compute its matrix exponential $\exp(M)$, which is defined, using an extension of the Maclaurin series for $e^x$, as  \exp(M)...
1k views

### Odds that a string of N digits contains two or more of the same

I have to fill in 2fa codes all day. They're 6-digit strings. One day I noticed that not once did any of these codes contain 6 unique digits, like 198532 There was always at least one double, like ...
The name of the challenge was prompted by this GIF and the GIF also gave me the idea. Your challenge today is to take a input guaranteed to be $2<=n<=100$ and output a sequence of ...
Consider, for a given positive integer $k$, the sequence $(a, a+1, a+2, ..., a+k)$, where $a$ is some positive integer. Is there ever a pair $a, k$ such that for each element $a+i$ in the ...