Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sequence]

For challenges involving sequences, typically of numbers following some pattern.

Filter by
Sorted by
Tagged with
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+...
Arnauld's user avatar
  • 205k
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 ...
xnor's user avatar
  • 149k
-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, ...
guest271314's user avatar
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 ...
Domenico's user avatar
  • 2,463
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 ...
Peter Kagey's user avatar
  • 8,525
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 ...
ZaMoC's user avatar
  • 25.4k
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 ...
bigyihsuan's user avatar
  • 11.4k
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 ...
Peter Kagey's user avatar
  • 8,525
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 ...
IY5dVSjABEeV's user avatar
  • 1,267
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,-...
Parcly Taxel's user avatar
  • 4,739
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 ...
Jonathan Allan's user avatar
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, <...
Lucenaposition's user avatar
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 ...
Wheat Wizard's user avatar
  • 103k
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 ...
Sophia Antipolis's user avatar
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 ...
Wheat Wizard's user avatar
  • 103k

15 30 50 per page
1
2 3 4 5
66
Morty Proxy This is a proxified and sanitized view of the page, visit original site.