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

A232014 Number of iterations of A032445 ("position of n in Pi") until a value is reached for the second time, when starting with n, or -1 if no value is repeated.

Original entry on oeis.org

16, 4, 3, 5, 6, 1
Offset: 0

Views

Author

M. F. Hasler, Nov 16 2013

Keywords

Comments

See A232013 for a variant based on A176341 instead of A032445.
Some loops: (5), (271070), (9292071), (40, 71), (2, 7, 14), (296, 1060, 13737, 133453, 646539, 294342, 141273). - Hans Havermann, Jul 26 2014
See Hans Havermann table (in links) for primary unknown-length evolutions. - Hans Havermann, Aug 06 2014

Examples

			a(1)=4 since A032445(1)=2 (the first "1" occurs after the initial "3" as second digit in Pi), A032445(2)=7 (the first "2" occurs as 7th digit of Pi's decimal expansion), A032445(7)=14, A032445(14)=2, which "closes the loop" after 4 iterations. (The initial value does not need to be part of the loop.)
		

Crossrefs

Cf. A032445.

Programs

  • PARI
    A232014(n)={my(u=0);for(i=1,9e9,u+=1<A032445(n))&&return(i))}

Extensions

Definition modified by N. J. A. Sloane, Jul 29 2014

A066712 Inverse of A032445, with first appearance of string "0" in decimal expansion of Pi added to A032445.

Original entry on oeis.org

3, 1, 4, 15, 5, 9, 2, 6, 53, 35, 58, 8, 97, 7, 93, 32, 23, 38, 84, 46, 62, 264, 64, 43, 33, 383, 83, 327, 27, 795, 95, 50, 0, 28, 88, 841, 419, 19, 971, 71, 16, 69, 939, 39, 99, 937, 37, 75, 51, 10
Offset: 1

Views

Author

Robert A. Stump (bee_ess107(AT)yahoo.com), Jan 13 2002

Keywords

Comments

First appearance of string n in decimal expansion of Pi

Examples

			a(4) = 15 because string 15 is the first appearance of a decimal string having first appearance starting at digit 4 of the decimal expansion of Pi.
		

Crossrefs

A176341 a(n) = the location of the first appearance of the decimal expansion of n in the decimal expansion of Pi.

Original entry on oeis.org

32, 1, 6, 0, 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, 0, 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, 41
Offset: 0

Views

Author

Daniel E. Loeb, Apr 15 2010

Keywords

Comments

It is unknown whether Pi is a normal number. If it is (at least in base 10) then this sequence is well defined.
The numbers a(n) refer to the position of the initial digit of n in the decimal expansion of Pi, where "3" is at position a(3)=0, "1" is at position a(1)=1, etc. This is also the numbering scheme used on the "Pi search page" cited among the LINKS. See A232013 for a sequence based on iterations of this one. See A032445 for a variant of the present sequence, where numbering starts at one. - M. F. Hasler, Nov 16 2013

Crossrefs

Programs

  • Mathematica
    p=ToString[FromDigits[RealDigits[N[Pi, 10^4]][[1]]]]; Do[Print[StringPosition[p, ToString[n]][[1]][[1]] - 1], {n, 0, 100}] (* Vincenzo Librandi, Apr 17 2017 *)
    With[{pid=RealDigits[Pi,10,800][[1]]},Flatten[Table[ SequencePosition[ pid,IntegerDigits[n],1],{n,0,70}],1]][[All,1]]-1 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 27 2019 *)
  • PARI
    A176341(n)=my(L=#Str(n));n=Mod(n,10^L);for(k=L-1,9e9,Pi\.1^k-n||return(k+1-L)) \\ Make sure to use sufficient realprecision, e.g. via \p999. - M. F. Hasler, Nov 16 2013
  • Python
    pi = "314159265358979323846264338327950288419716939937510582097494459230..."
    [ pi.find(str(i)) for i in range(10000) ]
    

Formula

a(n) = A032445(n)-1. - M. F. Hasler, Nov 16 2013
a(n) = 0 if n is in A011545, otherwise a(n) = A014777(n). - Pontus von Brömssen, Aug 31 2024

A032510 Scan decimal expansion of Pi until all n-digit strings have been seen; a(n) is last string seen.

Original entry on oeis.org

0, 68, 483, 6716, 33394, 569540, 1075656, 36432643, 172484538, 5918289042, 56377726040
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000796 (decimal expansion of Pi).
Cf. A080597 (number of digits in the decimal expansion of Pi that must be scanned to encounter all n-digit numbers).
Cf. A032445 (starting position of the first occurrence of n in the decimal expansion of Pi).

Extensions

More terms from Michael Kleber
More terms from Fabrice Bellard (fabrice(AT)bellard.org)

A064467 Primes in Pi: a(n) = first position in decimal expansion of Pi that matches the n-th prime, or 0 if there is no such position.

Original entry on oeis.org

7, 1, 5, 14, 95, 111, 96, 38, 17, 187, 1, 47, 3, 24, 120, 9, 5, 220, 99, 40, 300, 14, 27, 12, 13, 853, 3487, 1488, 207, 363, 298, 1097, 860, 526, 2607, 394, 1658, 1411, 1183, 429, 439, 729, 1945, 169, 38, 705, 94, 136, 485, 186, 230, 1689, 1708, 1714, 1007, 614
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 03 2001

Keywords

Examples

			A000040(4) = 7 = A000796(14) and A000796(i) <> 7 for i < 14, so a(4) = 14.
		

Crossrefs

Programs

  • Mathematica
    pi = ToString[ N[ Pi, 4000]]; pi = StringDrop[pi, {2}]; Table[ StringPosition[pi, ToString[ Prime[ n]], 1][[1, 1]], {n, 60}]
    With[{pidg=RealDigits[Pi,10,5000][[1]]},Table[SequencePosition[ pidg, IntegerDigits[ n]][[1,1]],{n,Prime[ Range[ 60]]}]] (* The program uses the SequencePosition function from Mathematica version 10 *) (* Harvey P. Dale, Jun 01 2015 *)

A088576 Position of the first location of n in the decimal expansion of e.

Original entry on oeis.org

14, 3, 1, 18, 11, 12, 21, 2, 4, 13, 196, 201, 371, 28, 224, 202, 95, 89, 3, 109, 112, 88, 253, 17, 34, 93, 31, 1, 5, 132, 72, 190, 111, 143, 144, 18, 20, 271, 86, 107, 67, 125, 98, 135, 240, 11, 104, 26, 229, 35, 236, 94, 16, 19, 77, 302, 154, 39, 326, 12, 21, 243, 33
Offset: 0

Views

Author

Cino Hilliard, Nov 19 2003

Keywords

Comments

Except for a(0), the same as A051238.

Examples

			The first 7 is in the 2nd position of the digits of e, so a(7) = 2.
		

Crossrefs

Cf. A001113 (decimal expansion of e).
Cf. A036900 (number of digits in the decimal expansion of e that must scanned to get all n-digit strings).
Cf. A032445 (positions in pi), A088577 (positions in phi).

Programs

  • Mathematica
    Module[{nn=400,ed},ed=RealDigits[E,10,nn][[1]];Table[SequencePosition[ed,IntegerDigits[n],1][[1,1]],{n,0,70}]] (* Harvey P. Dale, Mar 30 2025 *)
  • PARI
    trajedigitsd(n,m) = { default(realprecision,6000); p = exp(1)*10^5000; v = Vec(Str(p)); for(d=0,m, for(x=1,n, if(d<10, y = eval(v[x]), if(d<100, y = eval(v[x])*10 + eval(v[x+1]), if(d<1000, y = eval(v[x])*100 + eval(v[x+1])*10 + eval(v[x+2]), y = eval(v[x])*1000 + eval(v[x+1])*100 + eval(v[x+2])*10 + eval(v[x+3]) ); ); ); if(y == d,print1(x",");break); ); ) }

A232013 Number of iterations of A176341 ("position of n in Pi") until a value is reached for the second time, when starting with n, or -1 if no value is repeated.

Original entry on oeis.org

4, 1, 12, 4, 13, 14, 11, 10
Offset: 0

Views

Author

M. F. Hasler, Nov 16 2013

Keywords

Comments

See A232014 for a variant based on A032445 instead of A176341.
Some loops: (1), (711939213), (0, 32, 15, 3), (19, 37, 46), (40, 70, 96, 180, 3664, 24717, 15492, 84198, 65489, 3725, 16974, 41702, 3788, 5757, 1958, 14609, 62892, 44745, 9385, 169).
See Hans Havermann table (in links) for primary unknown-length evolutions.

Examples

			a(0)=4 since A176341(0)=32 (position of the first "0" in Pi's digits), A176341(32)=15 (position of the first "32" in Pi's digits), A176341(15)=3 (position of the first "15" in Pi's digits), A176341(3)=0 (position of the first "3" in Pi's digits); here we find the "0" again after 4 iterations, thus a(0)=4.
a(1)=1 since A176341(1)=1 (the first "1" occurs at position 1 in Pi's digits), which already "closes the loop" after 1 iteration.
a(2)=12 because the iterations yield 2 > 6 > 7 > 13 > 110 > 174 > 155 > 314 > 0 > 32 > 15 > 3 > 0, here we re-enter the loop (of length 4) after 12 iterations.
		

Programs

  • Mathematica
    pidigits = First[RealDigits[N[Pi, 10^6]]];
    Table[ lst = {}; test = n; steps = 1;
    While[AppendTo[lst, test]; !
       MemberQ[lst,
        test = First[
           First[SequencePosition[pidigits, IntegerDigits[test], 1]]] - 1],
    steps++ ]; steps, {n, 0, 7}] (* Robert Price, Aug 31 2019 *)
  • PARI
    A232013(n)={my(u=0);for(i=1,9e9,u+=1<A176341(n))&&return(i))}

Extensions

Edited by Hans Havermann, Aug 01 2014

A035331 Base-1000 expansion of Pi.

Original entry on oeis.org

3, 141, 592, 653, 589, 793, 238, 462, 643, 383, 279, 502, 884, 197, 169, 399, 375, 105, 820, 974, 944, 592, 307, 816, 406, 286, 208, 998, 628, 34, 825, 342, 117, 67, 982, 148, 86, 513, 282, 306, 647, 93, 844, 609, 550, 582, 231, 725, 359, 408, 128, 481, 117, 450
Offset: 0

Views

Author

Keywords

Comments

Start with a(0)=3; other terms are formed from triples of successive digits in the decimal expansion of Pi.
This sequence can be considered as a (pseudo)random generator with range 0..999. Its scatterplot graph is very similar to that of other random generators, e.g., A096558. - M. F. Hasler, May 14 2015

Examples

			Pi = 3.141 592 653 589 793 238 462 643 383 279 502 884 197 169 399 375 105 ...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[Pi,1000,60][[1]] (* Harvey P. Dale, Nov 22 2015 *)
  • PARI
    default(realprecision,3*N=100);vector(N,i,Pi\1000^(1-i)%1000) \\ or: {P=Pi;vector(N,i,P\1+0*P=frac(P)*1000)} or {P=Pi/1000;vector(N,i,floor(P=frac(P)*1000))}. \\ M. F. Hasler, May 11 2015

Formula

a(n) = floor(Pi*10^(3n)) mod 1000. - M. F. Hasler, May 14 2015

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Oct 04 2001
Better definition from Franklin T. Adams-Watters, Apr 10 2006

A051238 First appearance of string n in e.

Original entry on oeis.org

3, 1, 18, 11, 12, 21, 2, 4, 13, 196, 201, 371, 28, 224, 202, 95, 89, 3, 109, 112, 88, 253, 17, 34, 93, 31, 1, 5, 132, 72, 190, 111, 143, 144, 18, 20, 271, 86, 107, 67, 125, 98, 135, 240, 11, 104, 26, 229, 35, 236, 94, 16, 19, 77, 302, 154, 39, 326, 12, 21
Offset: 1

Views

Author

Keywords

Comments

A088576 has the a(0) term.

Crossrefs

Cf. A001113 (decimal expansion of e).
Cf. A088576 (same as a(n) but including the term for n = 0).
Cf. A032445.

Programs

  • Mathematica
    (* Computing 200000 digits of e is sufficient up to n=10000 *) eString = RealDigits[E, 10, 200000] // First // ToString /@ # & // StringJoin; a[n_] := (p = StringPosition[eString, n // ToString, 1]; If[p == {}, 0, p[[1, 1]]]); Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Mar 04 2013 *)
    With[{eee=RealDigits[E,10,200000][[1]]},Transpose[Flatten[Table[ SequencePosition[ eee,IntegerDigits[n],1],{n,70}],1]][[1]]] (* The program uses the SequencePosition function from Mathematica version 10 *) (* Harvey P. Dale, Nov 20 2015 *)

A036903 Scan decimal expansion of Pi until all n-digit strings have been seen; a(n) is number of digits that must be scanned.

Original entry on oeis.org

32, 606, 8555, 99849, 1369564, 14118312, 166100506, 1816743912, 22445207406, 241641121048, 2512258603207
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000796 (decimal expansion of Pi).
Cf. A080597 (= a(n) + 1).
Cf. A032445 (starting positions of the first occurrences of n the decimal expansion of Pi).
Cf. A032510 (last n-digit number seen when scanning for all n-digit numbers).

Formula

a(n) = A080597(n) - 1.

Extensions

a(8)-a(11) from fabrice(AT)bellard.org (Fabrice Bellard), Oct 23 2011
Showing 1-10 of 20 results. Next