Skip to main content

Questions tagged [pi]

This tag is for challenges involving the mathematical constant pi, the ratio of a circle's circumference to its diameter.

13 votes
11 answers
6k views

Print 100 digits of π

Your challenge is to print any 100 consecutive digits of π. You must give the index at which that subsequence appears. The 3 is not included. For example, you could print any of the following: ...
emanresu A's user avatar
  • 39.2k
17 votes
38 answers
3k views

Calculating π using the Gregory Leibniz series until n terms

based off my previous challenge, this wikipedia article, and a Scratch project Your task: given i, calculate \$\pi\$ till i ...
SectorCorruptor's user avatar
21 votes
17 answers
2k views

Calculate Pi unto a point using the Nilakantha series

Your task: given a nonzero positive number i, calculate pi using the Nilakantha series unto i terms. The Nilakantha series is as ...
SectorCorruptor's user avatar
8 votes
0 answers
433 views

Turing Machine that outputs pi

Turing Machine Preliminaries A Turing machine is specified by the following data A finite set of symbols S = \$\{s_1,s_2,...\}\$ A finite set of states M = \$\{m_1,m_2,...\}\$ A partially defined ...
QCD_IS_GOOD's user avatar
18 votes
5 answers
2k views

Find a sequence in the binary digits of π

Given a binary sequence of finite length, find the starting position where this sequence first appears in the binary digits of π (after the decimal). You can assume that an answer exists for any input ...
Roman's user avatar
  • 1,983
-4 votes
7 answers
417 views

Print om sign with pi

This time I will give you an easy challenge: Print the Om sign with \$\pi\$!(Sorry for many challenges with \$\pi\$) Here is the om sign drawn using pi numbers: ...
math scat's user avatar
  • 9,408
9 votes
8 answers
2k views

Music with pi and e

Because I forgot to celebrate Pi Day (14.3), let's celebrate with \$\pi\$, \$e\$ (Euler's number) and music! Challenge No, we don't have time to eat a pi-pizza, let's make a program. What you need is ...
math scat's user avatar
  • 9,408
22 votes
14 answers
3k views

Elastic collisions between blocks

The 3Blue1Brown Youtube channel released a video a year ago called "Why do colliding blocks compute pi?" which describes a model where a block A of mass \$a\$ ...
Peter Kagey's user avatar
  • 8,689
20 votes
22 answers
6k views

Pi to the power y, for small y's

Input This task takes no input. Output Your code should compute and print (or return) \$\pi^y\$ for all \$y = \frac11, \frac12, \frac13, \frac14, \frac15, \frac16, \frac17, \frac18, \frac19, \frac1{...
user avatar
-4 votes
6 answers
2k views

Output first \$n\$ digits of \$\pi^{1/\pi}\$

This challenge is to produce the shortest code for the constant \$\pi^{1/\pi}\$. Your code must output the first \$n\$ consecutive digits of \$\pi^{1/\pi}\$, where \$n\$ is given in the input. ...
user avatar
9 votes
9 answers
709 views

Pi Day: Determine if a list of words is correct Pilish

Background Though this is a bit late for Pi Day, I saw an article about Pilish and thought it would make a great challenge. Pilish is created by using a sequence of words where each word's length ...
mbomb007's user avatar
  • 23.4k
-4 votes
3 answers
423 views

Without using numbers, Calculate Pi [duplicate]

Inspired by Nicola Sap's Challenge Goal Your challenge is to simply produce π with 232-1 digits. However today's twist, like the title implies, is to produce it without using any numbers or any π ...
Veskah's user avatar
  • 4,120
-3 votes
7 answers
839 views

Calculate the sum of all odd digits of pi in range [duplicate]

Introduction In the not so distant future with the AI revolution, we will need a way to solve their captchas to prove we're not humans. This challenge was inspired by CommitStrip. Challenge One ...
Mackan90096's user avatar
13 votes
4 answers
755 views

Integers in Base Pi

Background: Pi (π) is a transcendental number, and therefore it has a non-terminating decimal representation. Similar, the representation doesn't terminate if ...
mbomb007's user avatar
  • 23.4k
31 votes
27 answers
7k views

Pi got your number

Challenge : \$\pi\$ is supposed to be infinite. That means every number is contained inside the decimal part of \$\pi\$. Your task will be to take a positive integer on input and return the position ...
The random guy's user avatar

15 30 50 per page