A057679
Self-locating strings within Pi: numbers n such that the string n is at position n in the decimal digits of Pi, where 3 is the first digit.
Original entry on oeis.org
5, 242424, 271070, 9292071, 29133316, 70421305, 215817165252, 649661007154
Offset: 1
5 is a term because 5 is the 5th digit of Pi (3.1415...).
-
StringsinPi[m_] := Module[{cc = 10^m + m, sol, aa}, sol = Partition[RealDigits[Pi,10,cc] // First, m, 1]; Do[aa = FromDigits[sol[[i]]]; If[aa==i, Print[{i, aa}]], {i,Length[sol]}];] (* For example, StringsinPi[6] returns all 6-digit members of the sequence. - Colin Rose, Mar 15 2006 *)
dpi = RealDigits[Pi, 10, 10000010][[1]]; Select[Range[10000000], FromDigits[Take[dpi, {#, # - 1 + IntegerLength[#]}]] == # &] (* Vaclav Kotesovec, Feb 18 2020 *)
A109513
Let k be an m-digit integer. Then k is a Pithy number if the k-th m-tuple in the decimal digits of Pi (after the decimal point) is the string k.
Original entry on oeis.org
1, 19, 94, 3542, 7295, 318320, 927130, 939240, 688370303, 7682437410, 7996237896, 89594051933
Offset: 0
1 is a term because the first digit in Pi (after the decimal point) is 1.
19 is a term because the 19th pair of digits (after the decimal point) in Pi is 19:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
3. 14 15 92 65 35 89 79 32 38 46 26 43 38 32 79 50 28 84 19 ...
-
PithyNumbers[m_] := Module[{cc = m(10^m)+m, sol, aa}, sol = Partition[RealDigits[Pi, 10, cc] // First // Rest, m]; Do[aa = FromDigits[sol[[i]]]; If[aa==i, Print[{i, aa}]], {i, Length[sol]}];] Example: PithyNumbers[4] produces all 4-digit Pithy numbers
A109514
Let k be an integer consisting of m digits. Then k is a Pithy number if the k-th m-tuple in the decimal digits of Pi is k.
Original entry on oeis.org
5, 9696, 19781, 199898, 687784863, 4518673035, 7526556436
Offset: 1
5 is a term because the 5th single digit in Pi is 5.
9696 is a term because the 9696th quadruplet in Pi is 9696.
-
PithyNumbersWith3[m_] := Module[{cc = m(10^m)+m, sol, aa}, sol = Partition[RealDigits[Pi, 10, cc] // First, m]; Do[aa = FromDigits[sol[[i]]]; If[aa==i, Print[{i, aa}]], {i, Length[sol]}];]
(* Example: PithyNumbersWith3[5] produces all 5-digit Pithy numbers *)
A064810
Self-locating strings within Pi: numbers n such that the string n is at position n in the decimal digits of Pi, where 1 is the 0th digit.
Original entry on oeis.org
6, 27, 13598, 43611, 24643510, 71683711, 78714901, 268561754, 4261759184, 82638677082, 548535559133, 8773143366618
Offset: 1
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 22 2001
6 is the first term because Pi is 3.1415926... and the digit 6 is in position 6 after the decimal point when the first 1 after the decimal point is considered to be at position 0.
-
Do[If[RealDigits[Pi,10,a=i+IntegerLength@i-1,-2][[1,i;;a]]==IntegerDigits@i,Print@i],{i,50000}] (* Giorgos Kalogeropoulos, Feb 21 2020 *)
-
# download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
with open('pi-billion.txt', 'r') as f: digits_of_pi = f.readline()[2:]
# from sympy import S, isprime
# digits_of_pi = str(S.Pi.n(3*10**5))[2:] # alternate to loading data
def afind():
global digits_of_pi
for k in range(len(digits_of_pi)):
s = str(k)
if digits_of_pi[k:k+len(s)] == s: print(k, end=", ")
afind() # Michael S. Branicky, Jun 27 2021
Error in a(11) reported by Sergey Prokudin, edited by
Robert Price, Mar 14 2022
A153221
Numbers k such that the string k is found at position k-3 in the decimal digits of Pi.
Original entry on oeis.org
51, 875, 62843, 242424, 4308765, 9710721, 24747689, 126987778
Offset: 1
a(1) = 51 because 51 occurs at offset (51-3) after the decimal in the digits of Pi.
-
from sympy import S
# download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
#with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()
pi_digits = str(S.Pi.n(3*10**5+2))[:-2] # alternative to above
pi_digits = pi_digits.replace(".", "")
def ispal(s): return s == s[::-1]
def afind():
for k in range(len(pi_digits)):
sk = str(k)
if sk == pi_digits[k-3:k-3+len(sk)]:
print(k, end=", ")
afind() # Michael S. Branicky, Jan 30 2022
A153223
Numbers k such that the string k is found at position k-4 in the decimal digits of Pi.
Original entry on oeis.org
9, 233, 1614, 9218, 27755974, 81259258, 120526011, 238732548, 651265325, 783609697
Offset: 1
a(1) = 9 because 9 occurs at offset (9-4) after the decimal in the digits of Pi.
-
from sympy import S
# download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
#with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()
pi_digits = str(S.Pi.n(3*10**5+2))[:-2] # alternative to above
pi_digits = pi_digits.replace(".", "")
def afind():
for k in range(5, len(pi_digits)):
sk = str(k)
if sk == pi_digits[k-4:k-4+len(sk)]:
print(k, end=", ")
afind() # Michael S. Branicky, Jan 30 2022
A153224
Numbers k such that the string k is found at position k-5 in the decimal digits of Pi.
Original entry on oeis.org
26, 32, 41, 86, 2799, 469113068
Offset: 1
a(1) = 26 because 26 occurs at offset (26-5) after the decimal in the digits of Pi.
-
from sympy import S
# download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
#with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()
pi_digits = str(S.Pi.n(3*10**5+2))[:-2] # alternative to above
pi_digits = pi_digits.replace(".", "")
def afind():
for k in range(6, len(pi_digits)):
sk = str(k)
if sk == pi_digits[k-5:k-5+len(sk)]:
print(k, end=", ")
afind() # Michael S. Branicky, Jan 30 2022
A205648
Self-locating strings within e: numbers n such that the string n is at position n (after the decimal point) in decimal digits of e.
Original entry on oeis.org
338, 2543, 91668, 170596, 420297, 33909384
Offset: 1
- Jingwei Liu and Yongzhi Pan, Slopi
Similar to
A057680 (self-locating strings within Pi).
A239316
Index of the first occurrence of a string of exactly n consecutive odd digits in the decimal expansion of Pi.
Original entry on oeis.org
18, 1, 4, 13, 282, 342, 783, 43, 4424, 412, 940, 8337, 44968, 61667, 33821, 106904, 336404, 421527, 31488, 1850725, 5854551, 8996526, 11709660, 2493200, 105887707, 86401248, 701257139, 546257302, 92438127
Offset: 1
Digit: 1 2 3 4 5 6 7 8 9 10 11 12 ...18 ...
Pi: 3 1 4 1 5 9 2 6 5 3 5 8 ....3 ...
Odd string: [2]...[ 3 ].....[ 3 ].......[1]...
. . .
. . .
a(2) a(3) a(1)
= 1 = 4 = 18
-
a239316[n_, checkDigits_: 100000] :=
Block[{foundPos,
piDigitBooleans = {#1[[1]],
Length[#]} & /@ (OddQ /@
RealDigits[N[Pi, checkDigits]][[1, 1 ;; All]] // Split)},
foundPos = FirstPosition[piDigitBooleans, {True, n}][[1]];
If[! NumericQ[foundPos],
Return["Not found within " <> ToString[checkDigits] <> " digits"]];
Total[piDigitBooleans[[1 ;; foundPos]][[All, 2]]] - n + 1]
a239316[#] & /@ Range[1, 15] (* Julien Kluge, Jan 31 2016 *)
-
with open("pib.txt") as f:
digits = f.read(1000000000)
for a in range(1,30):
found = False
place = 0
now = 0
while place < 999999999:
b = int(digits[place])
c = int(digits[place+1])
if b % 2 == 1:#digit is odd
now += 1
else:
now = 0
if now == a and c%2 == 0:
print(a,place-a+2)
found = True
break
place += 1
if not found:
print("Not found in first billion digits.")
# pib.txt is the first billion digits of pi, readily available online
# David Consiglio, Jr., Sep 22 2014
A153220
Self-locating strings within Pi: numbers n such that the string n is at position n (counting 3 and the decimal point) in decimal digits of Pi.
Original entry on oeis.org
4, 315, 360, 384, 47696, 496498, 1577526, 5607861220, 6106488294
Offset: 1
a(1)=4 because the 4th character (including the decimal point) in 3.14159... is also a 4.
-
dpi = RealDigits[Pi, 10, 10000010][[1]]; Select[Range[2, 10000000], FromDigits[Take[dpi, {# - 1, # - 2 + IntegerLength[#]}]] == # &] (* Vaclav Kotesovec, Feb 18 2020 *)
Showing 1-10 of 21 results.
Comments