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

A088577 Position of the first location of n in the digits of phi = 1.61803398874989....

Original entry on oeis.org

5, 1, 20, 6, 12, 23, 2, 11, 4, 8, 232, 35, 122, 56, 255, 367, 1, 36, 3, 189, 20, 55, 63, 132, 79, 214, 68, 64, 52, 175, 41, 138, 182, 6, 27, 57, 29, 99, 33, 7, 106, 91, 348, 28, 59, 22, 71, 103, 16, 12, 215, 395, 67, 112, 58, 769, 31, 49, 23, 167, 69, 2, 51, 32, 300, 30, 124
Offset: 0

Views

Author

Cino Hilliard, Nov 19 2003

Keywords

Examples

			The first 0 is in the 5th position of the digits of Phi, so 5 is the first entry in the sequence.
		

Crossrefs

Cf. A001622 (decimal expansion of phi).
Cf. A032445 (positions in Pi), A051238 (positions in e).

Programs

  • Mathematica
    With[{phistr = StringDrop[ToString[N[GoldenRatio, 1000]], {2, 2}]}, Table[ StringPosition[phistr, ToString[n], 1][[1, 1]], {n, 0, 70}]] (* Harvey P. Dale, Sep 17 2011 *)
  • PARI
    trajphidigitsd(n,m) = { default(realprecision,6000); p = (sqrt(5)+1)/2*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); ); ) }

A228412 Number of iterations of A176341 ("position of m in Pi") starting with n until a loop is reached.

Original entry on oeis.org

0, 0, 8, 0, 9, 10, 7, 6
Offset: 0

Views

Author

M. F. Hasler, Nov 16 2013

Keywords

Comments

"A loop is reached" means that an element x is reached such that (A176341^k)(x) = x for some k>0.

Examples

			a(0)=a(1)=a(3)=0 since 0 and 3 are elements of the loop 0 -> 32 -> 15 -> 3 -> 0, and 1 is a fixed point (i.e., loop of length 1) of A176341.
a(2)=8 is the number of steps in 2 -> 6 -> 7 -> 13 -> 110 -> 174 -> 155 -> 314 -> 0, at which point the previously mentioned loop is reached.
		

Crossrefs

Programs

  • PARI
    A228412(n)={my(u=0);for(i=1,9e9,u+=1<A176341(n))&&return(i-A232013(n)))}

A194351 Starting position of the first occurrence of a string of 2^n in the decimal expansion of Pi.

Original entry on oeis.org

1, 6, 2, 11, 40, 15, 22, 148, 1750, 1842, 12735, 26862, 27372, 2943, 37619, 39587, 106920, 820238, 76875, 47887, 6150809, 3660438, 17376657, 15416321, 162454456, 132295965, 265234498, 33844308, 4847933000, 671531549, 1122335995, 2894348872, 763748417
Offset: 0

Views

Author

Kausthub Gudipati, Aug 22 2011

Keywords

Comments

a(46) > 50*10^12. - _Dmitry Petukhov, Oct 27 2021

Examples

			Pi = 3.141592653589793238462643383279502884197169399375105.. The '1' (2^0) after the decimal point is at position 1. The '1' of the first occurrence of '16' (2^4) is at position 40.
		

Crossrefs

Programs

  • Mathematica
    d = ToString[N[Pi-3, 1000000]]; Table[pos = StringPosition[d, ToString[2^n], 1]; If[pos == {}, Print["not enough digits for ", 2^n]; pos = 0, pos = pos[[1, 1]] - 2], {n, 0, 19}] (* T. D. Noe, Sep 02 2011 *)

Formula

a(n) = A032445(2^n)-1. - R. J. Mathar, Sep 02 2011

Extensions

Terms corrected by D. S. McNeil, Sep 02 2011
a(29), a(32) from D. S. McNeil, Sep 03 2011
Edited by Hans Havermann, Jul 22 2014
a(28), a(30)-a(31) from Hans Havermann, Jul 22 2014
a(33)-a(43), a(45) from Dmitry Petukhov, Jan 27 2020
a(44) from Dmitry Petukhov, Oct 27 2021

A349551 Rectangular array with ten rows, read by falling antidiagonals: row k gives positions of k in the decimal expansion (A000796) of Pi.

Original entry on oeis.org

33, 51, 2, 55, 4, 7, 66, 38, 17, 1, 72, 41, 22, 10, 3, 78, 50, 29, 16, 20, 5, 86, 69, 34, 18, 24, 9, 8, 98, 95, 54, 25, 37, 11, 21, 14, 107, 96, 64, 26, 58, 32, 23, 30, 12, 117, 104, 74, 28, 60, 49, 42, 40, 19, 6
Offset: 0

Views

Author

Clark Kimberling, Dec 17 2021

Keywords

Comments

Every positive integer occurs exactly once.
It is assumed that each digit occurs infinitely many times in A000796.

Examples

			(Base-10 digits of Pi) = (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, ...); the position of the first 0 is 33, so the first term in row 0 is 33.
Corner:
  33, 51, 55, 66, 72, 78, 86, 98,  107,  117, 122, ... A014976
   2,  4, 38, 41, 50, 69, 95, 96,  104,  111, 139, ... A053745
   7, 17, 22, 29, 34, 54, 64, 74,   77,   84,  90, ... A053746
   1, 10, 16, 18, 25, 26, 28, 44,   47,   65,  87, ... A053747
   3, 20, 24, 37, 58, 60, 61, 71,   88,   93, 105, ... A053748
   5,  9, 11, 32, 49, 52, 62, 91,  110,  131, 132, ... A053749
   8, 21, 23, 42, 70, 73, 76, 83,   99,  109, 118, ... A053750
  14, 30, 40, 48, 57, 67, 97, 100, 121,  140, 157, ... A053751
  12, 19, 27, 35, 36, 53, 68, 75,   79,   82,  85, ... A053752
   6, 13, 15, 31, 39, 43, 45, 46,   56,   59,  63, ... A053753
		

Crossrefs

Cf. A000796, A014976, A053745-A053753, A032445 (includes column 1).

Programs

  • Mathematica
    r = RealDigits[Pi, 10, 200][[1]]
    t = Table[Flatten[Position[r, n]], {n, 0, 9}]
    TableForm[t]  (* A349551 array *)
    Flatten[Table[t[[n - k + 1, k]], {n, 10}, {k, n, 1, -1}]] (* A349551 sequence *)

A280532 a(1) = a(2) = 1, a(n) = A014777(a(n-1) + a(n-2)), n >= 3.

Original entry on oeis.org

1, 1, 6, 13, 37, 31, 605, 1411, 7174, 15567, 608953, 78903, 334535, 611552, 105928, 2557047, 2979162, 3263358, 6242520, 7825254, 37404834, 267494881, 639174488
Offset: 1

Views

Author

Anders Hellström, Jan 13 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{a = {1, 1}, s = First@ RealDigits[N[Pi, 10^7]]}, Do[AppendTo[a, -1 + SequencePosition[s, IntegerDigits[ a[[n - 1]] + a[[n - 2]] ]][[1, 1]]], {n, 3, 20}]; a] (* Michael De Vlieger, Jan 14 2017 *)

A332262 Maximum position to start a search within the decimal digits of Pi in order to find all numeric strings with length n.

Original entry on oeis.org

32, 605, 8553, 99846, 1369560, 14118307, 166100500, 1816743905, 22445207398, 241641121039, 2512258603197
Offset: 1

Views

Author

Martin Renner, Feb 25 2020

Keywords

Comments

The minimum position is always 1.

Examples

			a(1) = 32, since 0 appears at the 32nd decimal digit of Pi.
a(2) = 605, since 68 appears at the 605th decimal digit of Pi.
a(3) = 8553, since 483 appears at the 8553rd decimal digit of Pi.
		

Crossrefs

Formula

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

Extensions

a(9)-a(11) from A080597(n) - n by Jinyuan Wang, Mar 01 2020

A332929 Position where the binary expansion of n occurs for the first time in the binary expansion of Pi.

Original entry on oeis.org

3, 1, 2, 1, 2, 18, 1, 13, 8, 2, 21, 18, 1, 17, 16, 13, 8, 27, 2, 62, 25, 21, 18, 93, 49, 1, 20, 17, 95, 16, 15, 13, 97, 8, 27, 45, 2, 128, 62, 146, 25, 60, 21, 395, 229, 18, 93, 209, 49, 65, 1, 78, 42, 20, 17, 105, 95, 116, 186, 16, 175, 15, 14, 13, 97, 110
Offset: 0

Views

Author

Thomas König, Mar 02 2020

Keywords

Examples

			In binary, Pi = 11.00100100.... The bitstring 10 (for 2) occurs at position 2, so a(2) = 2.
		

Crossrefs

Cf. A032445 (for decimal expansion rather than binary).

Programs

  • Mathematica
    p = RealDigits[Pi,2,500][[1]]; L = {}; Do[t = SequencePosition[p, IntegerDigits[n, 2], 1]; If[t == {}, Break[], AppendTo[L, t[[1, 1]]]], {n, 0, 65}]; L (* Giovanni Resta, Mar 16 2020 *)
    Module[{nn=500,bp},bp=RealDigits[Pi,2,nn][[1]];Table[ SequencePosition[ bp,IntegerDigits[n,2],1][[All,1]],{n,0,70}]]//Flatten (* Harvey P. Dale, Sep 18 2021 *)
  • Perl
    #! /usr/bin/perl
    # Feed b004601.txt to this to get the binary digits of Pi.
    while (<>) {
        chomp;
        (undef, $d[$n++]) = split(" ");
    }
    $pi = join("",@d);
    $k = 0;
    while (1) {
        last if ($pos = index($pi, sprintf("%b", $k++))) < 0;
        $out .= $pos +2 . ", ";
    }
    print $out,"\n";

A381980 a(n) is the first position where the digits of n occur simultaneously in the decimal expansions of Pi and e.

Original entry on oeis.org

331, 95, 17, 18, 263, 326, 21, 40, 206, 13, 13422, 428, 500, 6426, 12896, 11172, 17951, 962, 9710, 2857, 9261, 4782, 21688, 17, 26172, 2526, 2060, 2900, 5375, 6167, 10097, 13009, 9287, 12651, 4175, 840, 38691, 11997, 14119, 3519, 4684, 21785, 7662, 1798, 1253, 10869, 9157, 7216, 3430, 13191, 5148, 1843, 10790
Offset: 0

Views

Author

Zhining Yang, Mar 11 2025

Keywords

Comments

The digits of the decimal expansions are numbered starting with 1 at the initial digits 3 (resp. 2).

Examples

			a(9) = 13 because the first "9" appears simultaneously in Pi and e at index 13:
Pi = 3.1415926535897932384626...
     . ...........|.............
 e = 2.7182818284590452353602...
		

Crossrefs

Cf. A000796 (Pi), A001113 (e).
Cf. A032445 (positions in Pi), A088576 (positions in e).
Cf. A052055 (positions in both Pi and e indicate a common digit).

Programs

  • Mathematica
    pi=RealDigits[Pi,10,40000][[1]];
    e=RealDigits[E,10,40000][[1]];
    Table[Intersection[SequencePosition[pi,IntegerDigits[k]][[All,1]],SequencePosition[e,IntegerDigits[k]][[All,1]]][[1]],{k,0,52}]

A100080 Position of first occurrence of n after the decimal point in the decimal expansion of 1/Pi.

Original entry on oeis.org

5, 2, 26, 1, 29, 19, 9, 13, 3, 6, 297, 64, 50, 385, 45, 18, 116, 65, 2, 41, 393, 102, 85, 125, 35, 93, 26, 86, 32, 43, 4, 1, 92, 58, 59, 69, 126, 12, 165, 151, 36, 717, 437, 196, 226, 29, 60, 160, 46, 55, 30, 112, 25, 19, 108, 90, 105, 134, 123, 70, 88, 9, 446, 149, 236, 511
Offset: 0

Views

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Nov 03 2004

Keywords

Comments

a(0) = A133268(1),
a(1) = A134251(1),
a(2) = A134252(1),
a(3) = A134253(1),
a(4) = A134254(1),
a(5) = A134255(1),
a(6) = A134256(1),
a(7) = A134257(1),
a(8) = A134258(1),
a(9) = A134259(1),
a(10) = A134260(1). - Artur Jasinski, Oct 16 2007

Examples

			1/Pi = 0.31830988618379067153776752674... so the first occurrence of 0 after the decimal point is at position 5; first occurrence of 1 is at position 2; first occurrence of 2 is at position 26; etc.
		

Crossrefs

Programs

  • Mathematica
    Table[ SequencePosition[#, IntegerDigits@ n][[1, 1]], {n, 0, 65}] &@ First@ RealDigits@ N[1/Pi, 10^4] (* James C. McMahon, Feb 06 2024 *)

Extensions

Edited by N. J. A. Sloane, Jun 30 2008 at the suggestion of R. J. Mathar

A333128 Ending position of the first occurrence of n in the decimal expansion of Pi.

Original entry on oeis.org

33, 2, 7, 1, 3, 5, 8, 14, 12, 6, 51, 96, 150, 112, 3, 5, 42, 97, 426, 39, 55, 95, 137, 18, 294, 91, 8, 30, 35, 188, 66, 2, 17, 26, 88, 11, 287, 48, 19, 45, 72, 4, 94, 25, 61, 62, 21, 121, 89, 59, 33, 50, 174, 10, 193, 132, 212, 406, 12, 6, 129, 221, 22, 314
Offset: 0

Views

Author

Francesco Vissani, Apr 08 2020

Keywords

Comments

Variant of A032445, considering the position of the least-significant digit of n in the decimal expansion of Pi (A000796).

Crossrefs

Programs

  • Mathematica
    n = 1000;
    intPi = Ceiling[N[Pi, n]*10^(n-1)];
    piString = ToString[intPi];
    Table[StringPosition[piString, ToString[n]][[1, 2]] , {n, 0, 70}]

Formula

a(n) = A032445(n) for n=0..9.
a(n) = 1 + A032445(n) for n = 10..99.
a(n) = A004216(n) + A032445(n).
Previous Showing 11-20 of 20 results.