cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 21-23 of 23 results.

A096764 Index of first occurrence of exactly n consecutive zeros in a row in the decimal expansion of Pi.

Original entry on oeis.org

32, 307, 601, 13390, 17534, 1699927, 3794572, 172330850, 2542542102, 8324296435, 371247087572, 1755524129973, 3186699229890, 6381820482331
Offset: 1

Views

Author

Robert G. Wilson v, Jul 07 2004

Keywords

Comments

Presently identical to A050279 ("exactly" replaced by "at least"), but will most probably differ from some point on. - M. F. Hasler, Mar 21 2017, edited Mar 22 2017 and Sep 03 2017
a(15) > 22*10^12. - Dmitry Petukhov, Jan 28 2020

Crossrefs

Extensions

Edited by N. J. A. Sloane, Sep 03 2017
a(11)-a(14) added by Dmitry Petukhov, Jan 12 2020

A290977 First n-digit number to appear twice in a row in the decimal expansion of Pi.

Original entry on oeis.org

3, 59, 209, 9314, 64015, 886287, 7348278, 85105027
Offset: 1

Views

Author

Bobby Jacobs, Aug 16 2017

Keywords

Comments

209209 and 305305 appear in Pi before any 2-digit number appears twice in a row.
a(n) (n >= 1) begins at the following decimal places: 24, 413, 326, 8239, 107472, 1632152, 9719518. - Robert G. Wilson v, Aug 23 2017

Examples

			a(1) = 3 because 3 is the first 1-digit number to appear twice in a row in the decimal expansion of Pi = 3.14159265358979323846264(33)...
		

Crossrefs

Programs

  • Mathematica
    With[{s = Rest@ First@ RealDigits[N[Pi, 10^4]]}, Keys@ Merge[#, Identity] &@ Table[If[Length@ # > 0, TakeSmallest[#, 1], 0 -> 0] &@ Sort[Map[#[[1, 1]] &, DeleteCases[#, {}]]] &@ Map[SequenceCases[#, {a_, b_} /; b == a + n] &, KeyMap[FromDigits, PositionIndex@ Partition[s, n, 1]]], {n, 4}]] (* Michael De Vlieger, Aug 16 2017 *)
    pi = StringDrop[ ToString[ N[Pi, 1632200]], 2]; f[n_] := Block[{k = 1}, While[ StringTake[pi, {k, k +n -1}] != StringTake[pi, {k +n, k +2n -1}], k++]; k]; Array[f, 6] (* Robert G. Wilson v, Aug 17 2017 *)
  • PARI
    eva(n) = subst(Pol(n), x, 10)
    pistring(n) = default(realprecision, n+10); my(x=Pi); floor(x*10^n)
    pidigit(n) = pistring(n)-10*pistring(n-1)
    consecpidigits(pos, len) = my(v=vector(len)); for(k=1, len, v[k]=pidigit(pos+k)); v
    a(n) = my(v=[], w=[], x=1); while(1, v=consecpidigits(x, n); w=consecpidigits(x+n, n); if(v==w, return(eva(v))); x++) \\ Felix Fröhlich, Aug 16 2017
    
  • 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(3*10**5+2))[:-2] # alternative to above
    pi_digits = pi_digits.replace(".", "")
    def a(n):
        for k in range(1, len(pi_digits)-n):
            s = pi_digits[k:k+2*n]
            if s[0] != 0 and s[:len(s)//2] == s[len(s)//2:]:
                return int(s[:len(s)//2])
    print([a(n) for n in range(1, 6)]) # Michael S. Branicky, Jan 10 2022

Extensions

a(6) from Robert G. Wilson v, Aug 19 2017
a(7) from Bobby Jacobs, Aug 22 2017
a(8) from Michael S. Branicky, Jan 10 2022

A256160 Index of the n-th 9 in the first occurrence of a string of exactly n 9's in the decimal expansion of Pi.

Original entry on oeis.org

6, 46, 2952, 17992, 19451, 768, 1722783, 36356650, 564665215, 20148132320, 27014073315, 897831316568, 10542036048463, 5758910552723
Offset: 1

Views

Author

Kival Ngaokrajang, Mar 16 2015

Keywords

Comments

A048940 is 5, 44, 762, 762, 762, 762, 1722776, 36356642, 564665206, ... - Alonso del Arte, Mar 25 2015

Crossrefs

Programs

  • PARI
    { default(realprecision, 20080); for (m = 1, 10, x = Pi; r = 0; for (n = 1, 20000, d = floor(x); x = (x-d)*10; if(d <> 9, if (r <> m, r = 0, print1(n-1, ", "); r = 0; break), r = r + 1)))}

Formula

a(n) = A096763(n) + n. - Danny Rorabaugh, Mar 31 2015

Extensions

a(10)-a(14) added using A096763 by Jinyuan Wang, Mar 30 2020
Previous Showing 21-23 of 23 results.