# Questions tagged [sequence]

For challenges involving some sort of sequence.

665 questions
Filter by
Sorted by
Tagged with
7k views

### What's my telephone number?

Introduction The telephone numbers or involution numbers are a sequence of integers that count the ways $n$ telephone lines can be connected to each other, where each line can be connected to at ...
226 views

### Cutting Sequence for N dimensions

Inputs: The program or function should take 2 vector-like (e.g. a list of numbers) O and V of the same number of dimensions, and a number T (all floating-point numbers or similar) Constraints: T >=...
3k views

### Smallest number such that concatenation is a square

Challenge Write a program or function that takes a number $n$ and returns the smallest $k$ such that concatenation $n'k$ is a square. This sequence is described by A071176 on the OEIS. I/O ...
398 views

### Partitioning Digits into Distinct Integers

Given a sequence of base-10 digits, output the longest list of integers that contains all the digits exactly once, in the order in which they appeared in the input, without repeating any integers. ...
230 views

### Shorten String as Much as Possible [closed]

Introduction In a list of strings, there is a certain length you can shorten strings to before they become indistinguishable. This is a pretty bad explanation, so here is an example. ...
188 views

### How Shuffled is this Sequence?

Given a sequence $S$ with length $n$ of exactly one each of whole numbers from $1$ to $n$, your task is to return a number $\sigma$ indicating how shuffled it is. Definition of shuffledness ...
244 views

### Maximal 2-distance Sets

In the plane ($\mathbb R^2$) we can have at most five distinct points such that the distances from each point to every other point (except itself) can assume at most two distinct values. An example ...
2k views

### N-Dimensional Cartesian Product

Introduction The Cartesian product of two lists is calculated by iterating over every element in the first and second list and outputting points. This is not a very good definition, so here are some ...
68 views

2k views

### What's this constructed number's starter?

A number of programming languages construct large integers through 'concatenating' the digit to the end of the existing number. For example, Labyrinth, or Adapt. By concatenating the digit to the end, ...
4k views

### Count the number of triangles

Given a list of positive integers, find the number of triangles we can form such that their side lengths are represented by three distinct entries of the input list. (Inspiration comes from CR.) ...
2k views

### Count the number of shortest paths to n

This code challenge will have you compute the number of ways to reach $n$ starting from $2$ using maps of the form $x \mapsto x + x^j$ (with $j$ a non-negative integer), and doing so in the ...
243 views

### Crossing sequences

Crossing Sequences Given a list of positive integers A, call it an increasing sequence if each element is greater than or equal to the previous one; and call it a ...
4k views

### Inverse Colombian Function

Let's define a sequence: The n digit summing sequence (n-DSS) is a sequence that starts with n. If the last number was k, then the next number is k + digit-sum(k). Here are the first few n-DSS: ...
316 views

### Draw Recamán's sequence with ASCII

Recamán's sequence (A005132) is a mathematical sequence, defined as such: A(n) = \begin{cases}0 & \textrm{if } n = 0 \\ A(n-1) - n & \textrm{if } A(n-1) - n \textrm{ is positive and not ...
418 views

### Find the hardest OEIS sequence to golf!

Notice: This question originally had people write comments with a shorter program, rather than new answers. This has been changed so that people with shorter programs can get reputation too. Hopefully ...
394 views

### Reverse your code, reverse the OEIS

The task here is to write a program that takes an natural number, $n$, and produces the $n$th term of an OEIS sequence. That sequence should have an identifier in the form of ...
3k views

### Robbers: The Hidden OEIS Substring

This is a Cops and Robbers challenge. This is the robber's thread. The cop's thread is here. The cops will pick any sequence from the OEIS, and write a program p that prints the first integer from ...
4k views

### Cops: The Hidden OEIS Substring

This is a Cops and Robbers challenge. This is the cop's thread. The robber's thread is here. As a cop, you must pick any sequence from the OEIS, and write a program p that prints the first integer ...
72 views

### Mutation chain generator [duplicate]

Given a start word and a target word, print the "mutation chain" that starts at the start word and ends at the target word. You may assume both words are lowercase and only have alphabetic characters....
559 views

### Counting generalized polyominoes

This challenge will have you count pseudo-polyforms on the snub square tiling. I think that this sequence does not yet exist on the OEIS, so this challenge exists to compute as many terms as possible ...
4k views

### Two palindromes are not enough

Some numbers, such as $14241$, are palindromes in base 10: if you write the digits in reverse order, you get the same number. Some numbers are the sum of 2 palindromes; for example, $110=88+22$, ...
657 views

### Output the nth 'boring' number

There are 9 main types of numbers, if you categorise them by the properties of their factors. Many numbers fall into at least one of these categories, but a few don't. The categories are as follows: ...
3k views

### First occurrence in the Sixers sequence

The Sixers sequence is a name that can be given to sequence A087409. I learned about this sequence in a Numberphile video, and it can be constructed as follows: First, take the multiples of 6, ...
6k views

### Nth term of Van Eck Sequence

Output the Nth term of the Van Eck Sequence. Van Eck Sequence is defined as: Starts with 0. If the last term is the first occurrence of that term the next term is 0. If the last term has occurred ...
1k views

### An OEIS polyglot

This is an answer-chaining challenge relating to the OEIS. Oh, the justification for this is because a company needs one program to print out their OEIS sequences real bad and they have every ...
2k views

2k views

### Hostile Divisor Numbers

Some divisors of positive integers really hate each other and they don't like to share one or more common digits. Those integers are called Hostile Divisor Numbers (HDN) Examples Number <...
1k views

### Shantae Dance Matching

In the original Shantae game, there are transformation dances that you have to input in time using the D-Pad, A, and B. If you complete a predefined sequence while dancing, you will transform into the ...
1k views

### New Order #6: Easter Egg

Introduction (may be ignored) Putting all positive integers in its regular order (1, 2, 3, ...) is a bit boring, isn't it? So here is a series of challenges around permutations (reshuffelings) of all ...
2k views

### The Nth Gryphon Number

I came up with a series of numbers the other day and decided to check what the OEIS number for it was. Much to my surprise, the sequence did not appear to be in the OEIS database, so I decided to ...
3k views

### List *all* the tuples!

Write a program, given an input n, will generate all possible n-tuples using natural numbers. ...
710 views

### New Order #5: where Fibonacci and Beatty meet at Wythoff

Introduction (may be ignored) Putting all positive numbers in its regular order (1, 2, 3, ...) is a bit boring, isn't it? So here is a series of challenges around permutations (reshuffelings) of all ...