Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
5 votes
5 answers
252 views

Fractions nobody needs (because they can be reduced to a simpler form)

It happened in the 19th century. Georg was bored and started counting the rational numbers. Surprisingly, he discovered that there were no more of them than natural numbers. This insight made Georg ...
Sophia Antipolis's user avatar
18 votes
11 answers
2k views

Count squares in my pi approximation

One way to approximate π is the following: Start by drawing a 2x2 square with a quarter-circle in it. Then, the area of the quarter-circle is π. We can approximate this area by filling it with ...
emanresu A's user avatar
  • 42.4k
11 votes
10 answers
2k views

Smallest prime q such that concatenation (p+q)"q is a prime

Let p, q, and c := (p + q)"q (where " denotes concatenation) be positive integers such that p and c are primes and q is the smallest prime such that c is prime. Such a prime triple (p, q, (p ...
Sophia Antipolis's user avatar
15 votes
10 answers
1k views

Sylvester primes

Sylvester's sequence can be defined recursively S(n) = S(n-1)*(S(n-1) + 1) for n >= 1 starting S(0) = 1. Since S(n) and S(n) + 1 have no common divisors, it follows that S(n) has at least one more ...
Sophia Antipolis's user avatar
15 votes
15 answers
1k views

Sums of X*Y chunks of the nonnegative integers

Consider the infinite table of the nonnegative integers with width 12: ...
noodle person's user avatar
14 votes
16 answers
573 views

Rabinowitz-Wagon \$\pi\$ formula

In 1995, Stanley Rabinowitz and Stan Wagon found an interesting algorithm to generate the digits of \$\pi\$ one by one without storing the previous results. The algorithm is called the spigot ...
alephalpha's user avatar
  • 49.4k
14 votes
5 answers
382 views

Generate a subgroup of a free group

In group theory, the free group with \$n\$ generators can be obtained by taking \$n\$ distinct symbols (let's call them \$a, b, c ...\$ etc), along with their inverses \$ a^{-1},b^{-1},c^{-1} ...\$ . ...
emanresu A's user avatar
  • 42.4k
17 votes
24 answers
2k views

Smallest Harmonic number greater than N

The sequence of Harmonic numbers are the sums of the reciprocals of the first k natural numbers (not including zero): \${\displaystyle H_{k}=1+{\frac {1}{2}}+{\frac {1}{3}}+\cdots +{\frac {1}{k}}=\sum ...
noodle person's user avatar
18 votes
18 answers
1k views

Output the inventory sequence

Goal Write a program that outputs this list: ...
12431234123412341234123's user avatar
15 votes
2 answers
400 views

Where are zeros? Self-describing sequence

Background A167519: Lexicographically earliest increasing sequence which lists the positions of the zero digits in the sequence. ...
Bubbler's user avatar
  • 78.2k
16 votes
6 answers
1k views

Golfing the complexity with subtraction

The Mahler-Popken complexity, \$C(N)\$, of a positive integer, \$N\$, is the smallest number of ones (\$1\$) that can be used to form \$N\$ in a mathematical expression using only the integer* \$1\$ ...
Jonathan Allan's user avatar
13 votes
11 answers
805 views

*Trivial* near-repdigit perfect powers

Task Output the sequence that precisely consists of the following integers in increasing order: the 2nd and higher powers of 10 (\$10^i\$ where \$i \ge 2\$), the squares of powers of 10 times 2 or 3 (...
Bubbler's user avatar
  • 78.2k
14 votes
10 answers
1k views

Enumerate all matches of a regex

related For this challenge, we'll be using a simplified dialect of regular expressions, where: A lowercase letter from a to z ...
emanresu A's user avatar
  • 42.4k
10 votes
4 answers
2k views

Output a 1-2-3-5-7... sequence

Follow-up of my previous challenge, inspired by @emanresu A's question, and proven possible by @att (Mathematica solution linked) For the purposes of this challenge, a 1-2-3-5-7... sequence is an ...
Tbw's user avatar
  • 2,143
21 votes
15 answers
2k views

Output a 1-2-3 sequence

For the purposes of this challenge, a 1-2-3 sequence is an infinite sequence of increasing positive integers such that for any positive integer \$n\$, exactly one of \$n, 2n,\$ and \$3n\$ appears in ...
Tbw's user avatar
  • 2,143

15 30 50 per page
1
2 3 4 5
59