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 11-20 of 21 results. Next

A153225 Numbers k such that the string k modulo 100 is found at position k in the decimal digits of Pi.

Original entry on oeis.org

1, 102, 104, 189, 193, 256, 302, 407, 467, 475, 503, 594, 702, 712, 751, 804, 881, 905, 978, 998, 1005, 1053, 1104, 1107, 1154, 1275, 1303, 1306, 1307, 1315, 1421, 1502, 1600, 1604, 1690, 1694, 1706, 1802, 1860, 1904, 1907, 1908, 2006, 2025, 2105, 2146, 2208
Offset: 1

Views

Author

Gil Broussard, Dec 21 2008

Keywords

Examples

			a(4) = 189 because 89 occurs at offset 189 after the decimal in the digits of Pi.
		

Crossrefs

Programs

  • 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 ispal(s): return s == s[::-1]
    def agen():
        for k in range(len(pi_digits)):
            sk = str(k%100)
            if sk == pi_digits[k:k+len(sk)]:
                yield k
    g = agen()
    print([next(g) for n in range(1, 48)]) # Michael S. Branicky, Jan 30 2022

Extensions

a(47) and beyond from Michael S. Branicky, Jan 30 2022

A153226 Numbers k such that the string k modulo 1000 is found at position k in the decimal digits of Pi.

Original entry on oeis.org

1, 1005, 1053, 1255, 2006, 2025, 2246, 2560, 3712, 4063, 4066, 4087, 5006, 5009, 5038, 5068, 5076, 5538, 6000, 6025, 6045, 7007, 7025, 7037, 8068, 8960, 9009, 9052, 10007, 10823, 11003, 11005, 12000, 12003, 12134, 12639, 14009, 14207, 14326, 14944, 15052, 16000
Offset: 1

Views

Author

Gil Broussard, Dec 21 2008

Keywords

Examples

			a(4) = 1255 because 255 occurs at offset 1255 after the decimal in the digits of Pi.
		

Crossrefs

Programs

  • 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 ispal(s): return s == s[::-1]
    def agen():
        for k in range(len(pi_digits)):
            sk = str(k%1000)
            if sk == pi_digits[k:k+len(sk)]:
                yield k
    g = agen()
    print([next(g) for n in range(1, 43)]) # Michael S. Branicky, Jan 30 2022

Extensions

a(40) and beyond from Michael S. Branicky, Jan 30 2022

A153227 Numbers k such that the string k is found at position 2k in the decimal digits of Pi.

Original entry on oeis.org

5, 95, 171, 529, 1913, 2753, 60597, 831092, 9552919
Offset: 1

Views

Author

Gil Broussard, Dec 21 2008

Keywords

Examples

			a(2) = 95 because 95 occurs at offset 190 (2*95) after the decimal in the digits of Pi.
		

Crossrefs

Programs

  • 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 afind():
        for k in range(1, len(pi_digits)):
            sk = str(k)
            if sk == pi_digits[2*k:2*k+len(sk)]:
                print(k, end=", ")
    afind() # Michael S. Branicky, Jan 30 2022

Extensions

a(8) corrected by Paul Tek, Jun 09 2013
a(9) from Michael S. Branicky, Jan 30 2022

A153228 Numbers k such that the string k is found at position 3k in the decimal digits of Pi.

Original entry on oeis.org

1, 2, 3, 85, 200, 447263
Offset: 1

Views

Author

Gil Broussard, Dec 21 2008

Keywords

Examples

			a(4) = 85 because 85 occurs at offset 255 (3*85) after the decimal in the digits of Pi.
		

Crossrefs

Programs

  • 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 afind():
        for k in range(1, len(pi_digits)):
            sk = str(k)
            if sk == pi_digits[3*k:3*k+len(sk)]:
                print(k, end=", ")
    afind() # Michael S. Branicky, Jan 30 2022

Extensions

a(6) corrected by Michael S. Branicky, Jan 30 2022

A201545 Numbers n such that the n-th digit (after the decimal point) in the decimal expansion of Pi are the occurrence of the least significant digit represented by the more significant digits.

Original entry on oeis.org

47, 281, 381, 399, 515, 648, 918, 928, 1303, 1538, 3746, 4026, 4812, 7347, 15911, 19129, 19191, 26709, 27249, 27959, 28299, 29820, 34009, 36089, 36989, 37169, 38989, 39700, 39710, 39720, 39869, 41970, 42170, 43950, 44627, 51686, 52486, 52526, 52836, 54639, 54769
Offset: 1

Views

Author

Matthew Goers, Dec 02 2011

Keywords

Comments

The 47th digit after the decimal point in the expansion of Pi (A000796, but without the leading 3) is the 4th occurrence of the digit 7; the 281st is the 28th occurrence of the digit 1; etc.
Only individual least significant digits are included. Does not include, for example, 467, which is the beginning position of the 4th occurrence of 67.

Examples

			The 399th digit after the decimal point in Pi is the 39th occurrence of the digit 9.
225 is not in the sequence, as the 225th digit is 5, but this is the 23rd occurrence of the digit 5 in the expansion of pi, not the 22nd.
		

Crossrefs

Programs

  • Maple
    Digits := 4000 ;
    pdg := proc(n)
            floor(Pi*10^n) mod 10 ;
    end proc:
    dfreq := Vector(10,0) ;
    for n from 1 do
            d := pdg(n) ;
            dfreq[d+1] := dfreq[d+1]+1 ;
            ld := n mod 10 ;
            hid := floor(n/10) ;
            if dfreq[d+1] = hid and ld = d then
                    print(n);
            end if;
    end do: # R. J. Mathar, Dec 16 2011

Extensions

a(12) and beyond from Michael S. Branicky, Mar 06 2025

A239317 Index of the first occurrence of a string of exactly n even numbers in the decimal expansion of Pi.

Original entry on oeis.org

3, 7, 53, 117, 33, 19, 965, 372, 1834, 70, 5876, 8878, 9288, 1279, 173580, 248625, 652113, 678288, 2199379, 1656691, 3455554, 30021792, 18707922, 26568757, 189709607, 36454145, 255896738, 388817627
Offset: 1

Views

Author

Kival Ngaokrajang, Mar 15 2014

Keywords

Comments

a(29) > 10^9
The string of even digits of length n must be preceded and followed by an odd digit. - Harvey P. Dale, Jan 27 2022

Examples

			Digit:         1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
Pi:            3 1 4 1 5 9 2 6 5  3  5  8  9  7  9 ...
Even string:   ...[1]......[2].........[1]............
                   .        .
                   .        .
                  a(1)     a(2)
                  = 3      = 7
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=389*10^6,dep},dep=If[EvenQ[#],1,0]&/@RealDigits[Pi,10,nn][[1]];Table[SequencePosition[dep,Join[{0},PadLeft[{0},n,1]],1][[1]],{n,2,29}][[All,1]]]+1 (* Harvey P. Dale, Jan 27 2022 *)
  • Python
    # Requires a text file "pib.txt" that contains the first billion digits of pi
    # without a decimal point or line breaks
    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 == 0:#digit is odd
                    now += 1
                else:
                    now = 0
                if now == a and c%2 == 1:
                    print(a,place-a+2)
                    found = True
                    break
                place += 1
            if not found:
                print("Not found in first billion digits.")
    # David Consiglio, Jr., Sep 22 2014
    # indentation corrected by David Radcliffe, May 09 2025

Extensions

More terms from David Consiglio, Jr., Sep 22 2014
Corrected and definition clarified by Harvey P. Dale, Jan 27 2022

A366830 Self-locating strings within Pi: numbers n such that the reverse string n starts at position n in the decimal digits of Pi, where 3 is the first digit.

Original entry on oeis.org

5, 1610, 5833, 82699856, 9633661255, 17292288245, 78246420246
Offset: 1

Views

Author

J. Volkmar Schmidt, Oct 31 2023

Keywords

Examples

			1610 is a term because '0161' starts at position 1610:
Position  1  2  3  4  ...  1610  1611  1612  1613  ...
Pi        3  1  4  1  ...    0     1     6     1   ...
		

Crossrefs

A366831 Self-locating strings within Pi: numbers n such that the reverse string n starts at position n in the decimal digits of Pi, where leading 3 is omitted.

Original entry on oeis.org

1, 50, 576, 242424, 746074, 10311073, 54848721, 103849853, 48438192357
Offset: 1

Views

Author

J. Volkmar Schmidt, Oct 31 2023

Keywords

Examples

			50 is a term because '05' starts at position 50,
576 is a term because '675' starts at position 576:
Position        1 2 3 ... 50 51 ... 576 577 578 ...
Pi (3 omitted)  1 4 1 ... 0  5  ... 6   7   5   ...
		

Crossrefs

A153230 Numbers k such that the string k is found at position k^2 in the decimal digits of Pi.

Original entry on oeis.org

1, 3, 22, 596, 43934, 78778, 249994
Offset: 1

Views

Author

Gil Broussard, Dec 21 2008

Keywords

Comments

a(5) > 10^4, if it exists. - Amiram Eldar, May 06 2024
From Michael S. Branicky, May 19 2025: (Start)
a(8) > 10^6.
Assuming uniformly random digits, the expected value is 0.9 terms per digit-length. (End)

Examples

			22 is in the sequence because 22 occurs at position 484 (22^2) after the decimal point in the digits of Pi.
		

Crossrefs

Programs

  • Mathematica
    With[{m = 10^3}, s = Rest@ RealDigits[Pi, 10, m^2][[1]]; q[n_] := s[[n^2 + Range[0, IntegerLength[n] - 1]]] == RealDigits[n][[1]]; Select[Range[m - 1], q]] (* Amiram Eldar, May 06 2024 *)

Extensions

a(5)-a(7) from Michael S. Branicky, May 18 2025

A332756 A loop sequence within Pi. Let a(1) = 19. For n > 1, a(n+1) is the position of the first occurrence of a(n) after the decimal point in the decimal expansion of Pi.

Original entry on oeis.org

19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37, 46, 19, 37
Offset: 1

Views

Author

Martin Renner, Feb 22 2020

Keywords

Comments

The sequence has a repeating cycle of length 3.

Crossrefs

Programs

  • Mathematica
    PadRight[{}, 100, {19, 37, 46}] (* Paolo Xausa, Apr 27 2024 *)

Formula

From Stefano Spezia, Feb 22 2020: (Start)
O.g.f.: x*(19 + 37*x + 46*x^2)/(1 - x^3).
E.g.f.: 34*(cosh(x) + sinh(x)) - 46 - 6*exp(-x/2)*(sqrt(3)*sin(sqrt(3)*x/2) - 2*cos(sqrt(3)*x/2)).
a(n) = a(n-3) for n > 3. (End)
Previous Showing 11-20 of 21 results. Next