Questions tagged [sequence]
For challenges involving sequences, typically of numbers following some pattern.
977 questions
20
votes
14
answers
904
views
A yet-unlisted sequence
I was looking for a simple sequence that's not yet referenced on the OEIS and came up with this one(*):
\$a_1=2\$
\$a_2=3\$
For \$n>2\$, \$a_n\$ is the smallest number of the form \$a_i\times a_j+...
15
votes
14
answers
2k
views
IMO 2025: Divisor sums that go forever
Problem 4 of the 2025 International Mathematical Olympiad asked (paraphrased):
Let \$f(n)\$ be the sum of the largest three proper divisors of \$n\$,
that is divisors excluding \$n\$ itself. For ...
-5
votes
4
answers
226
views
Locate \r\n\r\n in a HTTP/1.1 POST request
Given an HTTP/1.1 POST request represented as a buffer (e.g., Uint8Array; uint8_t) of bytes, ...
9
votes
4
answers
614
views
Triangular Transposition Cipher
A text that can be arranged triangularly in some fashion can be read back in some other fashion effectively enciphering it.
Narrowing down a set of plausible triangular numberings allows to ...
9
votes
2
answers
334
views
Putting the pieces together
In this code-golf challenge, you will count the number of ways of putting together pieces of a building toy which consists of slotted squares that interlock with one another, shown below. In ...
16
votes
17
answers
1k
views
Output the Echo Numbers
Echo numbers (A383896) are positive integers k such that the largest prime factor of k-1 is a suffix of ...
13
votes
17
answers
2k
views
Is it a product of 4 unique primes (A046386)?
A046386 is the sequence of all natural numbers that are the product of exactly 4 distinct primes.
Write the shortest program, function, or code snippet, that, when given a natural number, outputs ...
8
votes
1
answer
364
views
Ruler-and-compass constructions
In this code-golf challenge, you will work with a construction that was used by the ancient Greeks: the straightedge-and-compass construction. In particular, you will count how many different ...
9
votes
15
answers
1k
views
A121016: Numbers whose binary expansion is properly periodic. or A328594: Numbers whose binary expansion is aperiodic
I have been studying how to compress the Dis programs into their equvalent ones. One of the possibly easiest subset is programs with only } and ...
16
votes
17
answers
1k
views
Counting Gessel walks
OEIS A135404 gives the number of Gessel walks \$g(n)\$ of length \$2n\$. A Gessel walk is
a walk on the square lattice starting and ending at the origin
with possible steps (1,0), (-1,0), (1,1), (-1,-...
16
votes
12
answers
982
views
Repetition-restricted strings
Given an alphabet size, \$n>0\$, and an occurrence limit, \$k>0\$, produce the number, \$a(n, k)\$, of strings that may be constructed from the \$n\$ letters in the alphabet which have no more ...
17
votes
20
answers
2k
views
Number of legal positions in 1D go
A 1D go position on a board of size n is a sequence of length n consisting of the numbers0, <...
15
votes
9
answers
1k
views
How many chains?
Given a positive integer \$n\$, a partition of \$n\$ is an ascending sequence of numbers that sum to \$n\$.
Given two partitions \$a\$ and \$b\$, \$a\$ is a refinement of \$b\$ iff \$b\$ can be ...
13
votes
13
answers
2k
views
Meandering over ℤ
The easiest way to understand this task is to look at this
graph,
which you can change interactively.
It defines a sequence n -> a(n) like this:
a(0) = 0; thereafter a(n) is the least integer (in ...
14
votes
11
answers
1k
views
Counting Rota-Baxter words
A Rota-Baxter word, \$w\$, is a string made of the symbols a, (, and ) such that the ...