login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104866 Initial and final digits in the partition of decimal expansion of Pi. 7
3, 5, 0, 5, 9, 9, 8, 0, 6, 4, 4, 0, 2, 7, 5, 9, 0, 3, 2, 1, 4, 5, 5, 2, 0, 9, 2, 0, 9, 5, 3, 8, 5, 6, 7, 3, 7, 7, 1, 7, 5, 1, 2, 6, 0, 9, 0, 1, 0, 7, 9, 2, 3, 4, 1, 5, 1, 1, 0, 9, 5, 9, 0, 2, 5, 3, 4, 6, 1, 1, 7, 8, 7, 5, 9, 0, 5, 9, 2, 0, 9, 3, 3, 0, 1, 8, 9, 5, 9, 4, 9, 1, 5, 5, 7, 2, 5, 0, 4, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Start with decimal expansion of pi: s0=3,1,4,1,5,9,2,6,5,3,5,8,9,7,9,3,2,3,8,4,6,2,6,4,3,3,8,3,2,7,9,5,0,2,8,8,4,1,9,7,1,6,9,3,9,9,3,7,5,1,0,5,8,2,0,9,7,4,9,4,4,5,...
Divide s0 to the sections with the same final digits: s={3,1,4,1,5,9,2,6,5,3}, {5,8,9,7,9,3,2,3,8,4,6,2,6,4,3,3,8,3,2,7,9,5}, {0,2,8,8,4,1,9,7,1,6,9,3,9,9,3,7,5,1,0}, {5,8,2,0,9,7,4,9,4,4,5},...
Then A104865(n) = length of s(n): 10,22,19,11,...
A104866(n) = initial/final digits of s(n): 3,5,0,5,...
LINKS
MATHEMATICA
pi=First@RealDigits[Pi, 10, 10^6]; lst={pi[[1]]}; k=q=1; Do[While[pi[[++k]]!=lst[[q]]]; AppendTo[lst, pi[[k+1]]]; q++; k++, 100]; lst (* Giorgos Kalogeropoulos, Oct 22 2021 *)
PROG
(Python)
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(2*10**5))[:-1] # alternative to above
pi_digits = pi_digits.replace(".", "")
def aupton(terms):
alst, idx = [], 0
for n in range(1, terms+1):
digit, idx, c = pi_digits[idx], idx+1, 2
while pi_digits[idx] != digit:
idx += 1; c += 1
assert idx < len(pi_digits), "increase precision"
alst.append(int(digit)); idx += 1
return alst
print(aupton(100)) # Michael S. Branicky, Oct 22 2021
CROSSREFS
Sequence in context: A243967 A144541 A100609 * A165723 A257407 A224932
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Mar 29 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 02:44 EDT 2024. Contains 371917 sequences. (Running on oeis4.)