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!)
A104867 Records in A104865. 7

%I #18 Oct 22 2021 23:57:00

%S 10,22,44,49,57,70,71,82,98,100,104,119,136,139,140,149,162,163

%N Records in A104865.

%C 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,...

%C 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},...

%C Then A104865(n) = length of s(n): 10,22,19,11,...

%C A104866(n) = initial/final digits of s(n): 3,5,0,5,...

%C A104867 gives records in A104865.

%t pi = RealDigits[Pi, 10, 250000][[1]]; lst = {}; f := Block[{k = Position[pi, pi[[1]]][[2, 1]]}, pi = Drop[pi, k]; k]; Do[lst = {lst, f}, {n, 22500}]; lst = Flatten[lst]; lsu = {}; a = 0; Do[ If[lst[[n]] > a, a = lst[[n]]; AppendTo[lsu, a]], {n, 22500}]; lsu (* _Robert G. Wilson v_, Mar 29 2005 *)

%o (Python)

%o from sympy import S

%o # download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then

%o # with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()

%o pi_digits = str(S.Pi.n(2*10**5))[:-1] # alternative to above

%o pi_digits = pi_digits.replace(".", "")

%o def afind():

%o idx, record = 0, -1

%o while idx < len(pi_digits):

%o digit, idx, c = pi_digits[idx], idx+1, 2

%o while idx < len(pi_digits) and pi_digits[idx] != digit:

%o idx += 1; c += 1

%o if c > record:

%o record = c; print(c, end=", ")

%o idx += 1

%o afind() # _Michael S. Branicky_, Oct 22 2021

%Y Cf. A000796, A104865, A104866, A104868, A104869, A104870, A104871.

%K nonn,base,more

%O 1,1

%A _Zak Seidov_, Mar 29 2005

%E a(7)-a(10) from _Robert G. Wilson v_, Mar 29 2005

%E a(11)-a(17) from _Michael S. Branicky_, Oct 22 2021

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 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)