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.

Showing 1-10 of 25 results. Next

A014777 Position of the start of the first occurrence of n after the decimal point in Pi = 3.14159265358979323846264338327950288...

Original entry on oeis.org

32, 1, 6, 9, 2, 4, 7, 13, 11, 5, 49, 94, 148, 110, 1, 3, 40, 95, 424, 37, 53, 93, 135, 16, 292, 89, 6, 28, 33, 186, 64, 137, 15, 24, 86, 9, 285, 46, 17, 43, 70, 2, 92, 23, 59, 60, 19, 119, 87, 57, 31, 48, 172, 8, 191, 130, 210, 404, 10, 4, 127, 219, 20, 312, 22, 7, 117, 98, 605
Offset: 0

Views

Author

Paul Simon (paulsimn(AT)microtec.net) and Simon Plouffe

Keywords

Comments

This is A037008(1), A037000(1), A037001(1), A037002(1), A037003(1), A037004(1), A037005(1), A036974(1), A037006(1), A037007(1) etc.

Examples

			In the decimal expansion of Pi, the string "0" is found at position 32 counting from the first digit after the decimal point. The string "1" is found at position 1, the string "2" at position 6, the string "3" at position 9, etc.
		

Crossrefs

Programs

  • Magma
    k := 700; R := RealField(k); [ Position(IntegerToString(Round(10^k*(-3 + Pi(R)))), IntegerToString(n)) : n in [0..68] ]; /* Klaus Brockhaus, Feb 15 2007 */
    
  • Mathematica
    Table[-1 + SequencePosition[#, IntegerDigits@ n][[1, 1]], {n, 0, 68}] &@ First@ RealDigits@ N[Pi, 10^4] (* Michael De Vlieger, Aug 10 2016, Version 10.1 *)
  • PARI
    M14777=Map(); A014777(n)={iferr(mapget(M14777, n), E, my(i=if(n>9, A014777(n\10), 1), d=if(n, digits(n), [0]), j); while(i++, j=#d; until(!j, d[j]==A000796(i+j--) || next(2)); break); mapput(M14777, n, i--); i)} \\ M. F. Hasler, Jun 21 2022
    
  • Python
    from mpmath import mp
    def A014777(n):
        if not (i := A014777.pos.get(n, 0)):
            d = str(n); s = 2 # starting position for search
            while (i := A014777.pi.find(d, s)) < 1:
                s = max(len(A014777.pi) - len(d), 2)
                with mp.workdps(s + 99 if s < 500 else s*6//5): # new precision
                    A014777.pi = str(mp.pi - 5/mp.mpf(10)**mp.dps) # don't round
            i -= 1; A014777.pos[n] = i
        return i
    A014777.pi = ''; A014777.pos = {} # M. F. Hasler, Jun 21 2022

Extensions

More terms from Klaus Brockhaus, Feb 15 2007

A037000 Positions of the digit '1' in the decimal expansion of Pi.

Original entry on oeis.org

1, 3, 37, 40, 49, 68, 94, 95, 103, 110, 138, 148, 153, 154, 155, 163, 168, 174, 175, 198, 206, 220, 238, 243, 246, 250, 269, 281, 295, 297, 314, 319, 324, 342, 344, 362, 363, 381, 385, 390, 393, 395, 396, 417, 424, 427, 428, 432, 437, 438, 442, 445, 446
Offset: 1

Views

Author

Nicolau C. Saldanha (nicolau(AT)mat.puc-rio.br)

Keywords

Comments

From M. F. Hasler, Jul 28 2024: (Start)
"Positions" are indices n of digits d(n) such that Pi = Sum_{n >= 0} d(n)/10^n; see A053745 for the variant where the initial digit 3 is at position 1.
The first few primes in this sequence are 3, 37, 103, 163, 269, 281, 499, 541, 547, 587, 607, 709, 797, 859, 887, 971, 983, 997, ... (End)

Crossrefs

Cf. A000796 (decimals of Pi), A037001 - A037008 and A036974 (positions of other digits), A053745 (variant with all values increased by 1).

Programs

  • Maple
    P:= convert(evalf[100000](Pi),string)[3..-1]:
    select(t -> P[t]="1",[$1..length(P)-1]); # Robert Israel, Dec 22 2013
  • Mathematica
    Flatten @ Position[ RealDigits[Pi - 3, 10, 500][[1]], 1] (* Robert G. Wilson v, Mar 07 2011 *)
  • PARI
    A037000_upto(N=500, d=1)={localprec(N+20); [i-1|i<-[1..#N=digits(Pi\10^-N)], N[i]==d]} \\ M. F. Hasler, Jul 28 2024

Formula

Conjecturally, a(n) ~ 10n.

A037008 Positions of the digit '0' in the decimal expansion of Pi, where positions 0, 1, 2, ... correspond to digits 3, 1, 4, ....

Original entry on oeis.org

32, 50, 54, 65, 71, 77, 85, 97, 106, 116, 121, 128, 132, 146, 159, 164, 167, 176, 195, 207, 245, 248, 264, 270, 287, 291, 307, 308, 311, 327, 330, 340, 357, 360, 361, 366, 369, 375, 398, 403, 408, 421, 443, 451, 493, 513, 520, 523, 543, 545, 552, 557, 561
Offset: 1

Views

Author

Nicolau C. Saldanha (nicolau(AT)mat.puc-rio.br)

Keywords

Examples

			Pi = 3.14159 26535 89793 23846 26433 83279 5*0*288 4... (Position 32 refers to the 32nd digit after the decimal point.)
		

Crossrefs

Cf. A000796 (decimal expansion (or digits) of Pi).
For another version see A014976(n) = a(n) + 1.
For digits 0 through 9 see: this sequence, A037000, A037001, A037002, A037003, A037004, A037005, A036974, A037006, A037007.

Programs

  • Mathematica
    Flatten @ Position[ RealDigits[Pi - 3, 10, 500][[1]], 0] (* Robert G. Wilson v, Mar 07 2011 *)
  • PARI
    for(c=1,default(realprecision,2011)-2,Pi\.1^c%10 || print1(c",")) \\ M. F. Hasler, Oct 23 2011
    
  • PARI
    A037008_upto(N=999)={localprec(N+20); [i-1|i<-[1..#N=digits(Pi\10^-N)],!N[i]]} \\ M. F. Hasler, Jul 29 2024

Formula

a(n) = A014976(n) - 1. - M. F. Hasler, Jul 29 2024

Extensions

Name edited by M. F. Hasler, Jul 29 2024

A037007 Positions of the digit '9' in the decimal expansion of Pi, where positions 0, 1, 2,... correspond to digits 3, 1, 4, ....

Original entry on oeis.org

5, 12, 14, 30, 38, 42, 44, 45, 55, 58, 62, 79, 80, 100, 122, 129, 144, 169, 180, 187, 190, 193, 199, 208, 214, 247, 249, 259, 284, 294, 328, 331, 336, 341, 353, 356, 388, 391, 399, 414, 416, 418, 422, 433, 440, 459, 460, 465, 482, 487, 496, 498, 501, 527
Offset: 1

Views

Author

Nicolau C. Saldanha (nicolau(AT)mat.puc-rio.br)

Keywords

Comments

Primes in this sequence are 5, 79, 193, 199, 331, 353, 433, 487, 941, ... - M. F. Hasler, Jul 29 2024

Examples

			The first digit '9' occurs in 3.1415926... at the 5th place after the decimal point, whence a(1) = 5.
		

Crossrefs

Cf. A000796 (decimals of Pi).
Cf. A053753 (variant with all values increased by 1).
Cf. A037000, A037001, A037002, A037003, A037004, A037005, A036974, A037006, A037008 (similar for digits 1, ..., 8 and 0).
Cf. A048940, A096763 (starting position of at least/exactly n '9's).

Programs

  • Mathematica
    Flatten @ Position[ RealDigits[Pi - 3, 10, 500][[1]], 9] (* Robert G. Wilson v, Mar 07 2011 *)
  • PARI
    A037007_upto(N=999, d=9)={localprec(N+20); [i-1|i<-[1..#N=digits(Pi\10^-N)], N[i]==d]} \\ M. F. Hasler, Jul 29 2024

Formula

a(n) = A053753(n) - 1. - M. F. Hasler, Mar 20 2017
a(n) ~ 10*n if Pi is normal (as generally assumed, but yet unproved). - M. F. Hasler, Jul 29 2024

A036974 Positions of the digit '7' in decimal expansion of Pi.

Original entry on oeis.org

13, 29, 39, 47, 56, 66, 96, 99, 120, 139, 156, 166, 209, 224, 232, 235, 242, 288, 299, 301, 306, 320, 343, 351, 405, 407, 412, 429, 439, 452, 458, 463, 468, 475, 478, 486, 506, 538, 540, 544, 548, 556, 559, 560, 567, 569, 575, 577, 584, 591, 609, 621, 622
Offset: 1

Views

Author

Nicolau C. Saldanha (nicolau(AT)mat.puc-rio.br)

Keywords

Comments

In the first 400 digits of Pi, 7 is rare and only appears 24 times. In the next 250 digits of Pi, 7 is common and appears 38 times. - Bobby Jacobs, Oct 18 2016

Examples

			3.141592653589(7)932384626433832(7)950288419(7)1693993(7)510
58209(7)494459230(7)81640628620899862803482534211(7)06(7)9
8214808651328230664(7)093844609550582231(7)25359408128
48111(7)450284102(7)0193852110555964462294895493038196
44288109(7)56659334461284(7)5648233(7)86(7)831652(7)12019091
4564856692346034861045432664821339360(7)2602491412(7)3
(7)2458(7)0066063155881(7)4881520920962829254091(7)1536436
(7)8925903600113305305488204665213841469519415116094
3305(7)2(7)0365(7)5959195309218611(7)381932611(7)93105118548
0(7)44623(7)9962(7)4956(7)351885(7)52(7)2489122(7)93818301194912
98336(7)3362440656643086021394946395224(7)3(7)190(7)021(7)98
60943(7)02(77)053921(7)1(7)62931(7)6(7)523846(7)481846(7)669405132
00056812(7)14526356082(77)85(77)1342(7)5(77)896091(7)363(7)1(7)8(7)...
		

Crossrefs

Programs

  • Mathematica
    Flatten@Position[RealDigits[Pi - 3, 10, 500][[1]], 7] (* Robert G. Wilson v,Mar 07 2011 *)
    Union[Flatten[SequencePosition[RealDigits[Pi,10,700][[1]],{7}]]]-1 (* Harvey P. Dale, Jul 13 2023 *)

A037002 Positions of the digit '3' in the decimal expansion of Pi - 3.

Original entry on oeis.org

9, 15, 17, 24, 25, 27, 43, 46, 64, 86, 91, 111, 115, 123, 137, 142, 170, 194, 196, 215, 216, 230, 231, 237, 261, 265, 274, 282, 283, 285, 300, 313, 346, 349, 358, 364, 365, 368, 382, 401, 402, 409, 420, 430, 434, 441, 457, 469, 488, 492, 503, 504, 507, 508
Offset: 1

Views

Author

Nicolau C. Saldanha (nicolau(AT)mat.puc-rio.br)

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten @ Position[ RealDigits[Pi - 3, 10, 500][[1]], 3] (* Robert G. Wilson v, Mar 07 2011 *)

A037003 Positions of the digit '4' in the decimal expansion of Pi.

Original entry on oeis.org

2, 19, 23, 36, 57, 59, 60, 70, 87, 92, 104, 119, 125, 126, 145, 151, 157, 162, 182, 183, 188, 192, 201, 202, 217, 218, 223, 227, 251, 254, 262, 266, 271, 273, 278, 293, 296, 303, 321, 339, 348, 371, 376, 384, 386, 392, 400, 449, 453, 454, 464, 480, 497, 511
Offset: 1

Views

Author

Nicolau C. Saldanha (nicolau(AT)mat.puc-rio.br)

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten @ Position[ RealDigits[Pi - 3, 10, 500][[1]], 4] (* Robert G. Wilson v, Mar 07 2011 *)

A037004 Positions of the digit '5' in the decimal expansion of Pi.

Original entry on oeis.org

4, 8, 10, 31, 48, 51, 61, 90, 109, 130, 131, 133, 141, 143, 158, 172, 177, 178, 179, 191, 210, 213, 225, 240, 252, 256, 272, 304, 315, 316, 325, 338, 345, 355, 367, 370, 379, 389, 394, 404, 411, 413, 415, 419, 444, 448, 466, 470, 474, 476, 515, 534, 562
Offset: 1

Views

Author

Nicolau C. Saldanha (nicolau(AT)mat.puc-rio.br)

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten @ Position[ RealDigits[Pi - 3, 10, 500][[1]], 5] (* Robert G. Wilson v, Mar 07 2011 *)

A037005 Positions of the digit '6' in the decimal expansion of Pi.

Original entry on oeis.org

7, 20, 22, 41, 69, 72, 75, 82, 98, 108, 117, 118, 127, 181, 184, 200, 211, 212, 219, 226, 234, 239, 253, 257, 258, 263, 268, 276, 277, 286, 290, 309, 310, 312, 332, 347, 350, 359, 377, 378, 387, 397, 410, 426, 436, 455, 461, 467, 505, 509, 514, 516, 517
Offset: 1

Views

Author

Nicolau C. Saldanha (nicolau(AT)mat.puc-rio.br)

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten @ Position[ RealDigits[Pi - 3, 10, 500][[1]], 6] (* Robert G. Wilson v, Mar 07 2011 *)

A037006 Positions of the digit '8' in the decimal expansion of Pi.

Original entry on oeis.org

11, 18, 26, 34, 35, 52, 67, 74, 78, 81, 84, 88, 101, 105, 107, 113, 124, 134, 147, 150, 152, 161, 171, 189, 197, 204, 205, 222, 228, 233, 236, 255, 267, 279, 305, 317, 318, 322, 323, 334, 352, 372, 373, 383, 425, 431, 447, 450, 472, 473, 481, 489, 491, 502
Offset: 1

Views

Author

Nicolau C. Saldanha (nicolau(AT)mat.puc-rio.br)

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten @ Position[ RealDigits[Pi - 3, 10, 500][[1]], 8] (* Robert G. Wilson v, Mar 07 2011 *)
Showing 1-10 of 25 results. Next