For challenges involving some sort of sequence.

learn more… | top users | synonyms

6
votes
4answers
48 views

Compute the Eulerian number

The Eulerian number A(n, m) is the number of permutations of [1, 2, ..., n] in which exactly m elements are greater than the previous element. These are also called rises. For example, if n = 3, there ...
22
votes
22answers
3k views
+100

Compute the kangaroo sequence

Backstory Disclaimer: May contain made up information about kangaroos. Kangaroos traverse several stages of development. As they grow older and stronger, they can jump higher and longer, and they ...
13
votes
15answers
858 views

Digital Diversity

A positive integer may be represented in an integer base 1 <= b < inf. When converted to that base it has some number of distinct digits. Any positive integer in base 1 has 1 distinct digit. ...
16
votes
16answers
572 views

(KevinC's) Triangular DeciDigits Sequence

Input: A positive integer n which is 1 <= n <= 25000. Output: In this sequence we start with the decimal number 1/n. Then we take the sum of digits up until the n'th digit after the comma (1-...
0
votes
0answers
93 views

Generate series of numbers for given n [closed]

The challenge is to generate all combination of numbers which will start from 1 and end to n. There is a catch the series should take only the adjacent number. For example for series of n=3 the ...
34
votes
13answers
3k views

Incrementing Gray Codes

Introduction A Gray Code is an alternative to binary representation in which a number is incremented by toggling only one bit, rather than a variable amount of bits. Here are some gray codes along ...
42
votes
18answers
2k views

Dennis numbers 2.0

PPCG user and elected mod, @Dennis just became the second ever user to earn over 100k rep! This is a totally original idea, that I did not get from anybody else, but let's make a challenge based off ...
0
votes
10answers
2k views

0.0000000000000000001

Below, is a description of a sequence: 0.1, 0.01, 0.001, 0.0001, 0.00001, and so on, until reaching 0. {one hundred zeros} 1 Then, continued: 0.2, 0.02, 0.002, 0.0002, 0.00002, and so on, until ...
17
votes
19answers
1k views

Compute the Mertens function

Given a positive integer n, compute the value of the Mertens function M(n) where and μ(k) is the Möbius function where μ(k) = 1 if k has an even number of distinct prime factors, -1 if k has an odd ...
20
votes
6answers
843 views

Unlucky Numbers!

Things to know: First, lucky numbers. Lucky numbers are generated like so: Take all the natural numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20... Then, remove each ...
18
votes
16answers
2k views

Find the odd one out in a sequence

The Challenge: Consider the function F(N) = 2^N + 1 where N is a positive integer less than 31. The sequence defined by this function is: 3, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049, 4097, 8193, ...
22
votes
30answers
1k views

Prime counting function

Introduction The Prime Counting Function, also known as the Pi function π(x), returns the amount of primes less than or equal to x. Challenge Your program will take an integer x which you can ...
30
votes
21answers
7k views

Checkmate (aka the urinal problem)

My Precalc teacher has one of his favorite problems that he made up (or more likely stole inspired by xkcd) that involves a row of n urinals. "Checkmate" is a situation in which every urinal is ...
15
votes
8answers
751 views

Segmented numbers

The sequence of segmented numbers or prime numbers of measurement (OEIS A002048) is the sequence of numbers such that each member is the smallest positive (greater than zero) number that can't be made ...
24
votes
33answers
2k views

Invalid Invali Inval

This idea is loosely based upon @TùxCräftîñg's chat message. Take a look at the below example sequence: INVALID0, INVALID1, INVALID2 INVALID3, INVALID4... INVALID9 After INVALID9, it goes on like ...

15 30 50 per page