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

A376048 Lexicographically earliest sequence of positive integers a(1), a(2), a(3), ... such that for any n > 0, S(n) = Sum_{k = 1..n} b(k)/a(k) < 1, where {b(k)} = 3,1,4,1,5,... are the digits of Pi (cf. A000796).

Original entry on oeis.org

4, 5, 81, 1621, 13130101, 310319170452181, 21399552788917656689963823241, 1373822578697020375503379392874191898311737749943783762521
Offset: 1

Views

Author

N. J. A. Sloane, Sep 13 2024

Keywords

References

  • Rémy Sigrist and N. J. A. Sloane, Dampening Down a Divergent Series, Manuscript in preparation, September 2024.

Crossrefs

Programs

  • Maple
    For Maple code for all these sequences, see A376056.

Formula

a(n+1) = b(n+1)*A376049(n) + 1.

A244644 Consider the method used by Archimedes to determine the value of Pi (A000796). This sequence denotes the number of iterations of his algorithm which would result in a difference of less than 1/10^n from that of Pi.

Original entry on oeis.org

0, 1, 3, 5, 6, 8, 10, 11, 13, 15, 16, 18, 20, 21, 23, 25, 26, 28, 29, 31, 33, 34, 36, 38, 39, 41, 43, 44, 46, 48, 49, 51, 53, 54, 56, 58, 59, 61, 63, 64, 66, 68, 69, 71, 73, 74, 76, 78, 79, 81, 83, 84, 86, 88, 89, 91, 93, 94, 96, 98, 99, 101, 103, 104, 106, 108, 109, 111, 113, 114
Offset: 0

Views

Author

Keywords

Comments

It takes on average 5/3 iterations to yield another digit in the decimal expansion of Pi.
The side of a 96-gon inscribed in a unit circle is equal to sqrt(2-sqrt(2+sqrt(2+sqrt(2+sqrt(3))))). This is the size of one of the two polygons that Archimedes used to derive that 3 + 10/70 < Pi < 3 + 10/71.
In the Mathematica program, we started with an inscribed triangle and a circumscribed triangle of a unit circle and used decimal precision to just over a 1000 places.
The perimeter of the circumscribed 3*2^n-polygon exceeds Pi by more than the deficit of the perimeter of the inscribed 3*2^n-polygon. If we were to give twice the weight of the inscribed 3*2^n-polygon to that of the circumscribed 3*2^n-polygon, then the convergence would be twice as fast!
From A.H.M. Smeets, Jul 12 2018: (Start)
Archimedes's scheme: set upp(0) = 2*sqrt(3), low(0) = 3 (hexagons); upp(n+1) = 2*upp(n)*low(n)/(upp(n)+low(n)) (harmonic mean, i.e., 1/upp(n+1) = (1/upp(n) + 1/low(n))/2), low(n+1) = sqrt(upp(n+1)*low(n)) (geometric mean, i.e., log(low(n+1)) = (log(upp(n+1)) + log(low(n)))/2), for n >= 0. Invariant: low(n) < Pi < upp(n); variant function: upp(n)-low(n) tends to zero for n -> inf. The error of low(n) and upp(n) decreases by a factor of approximately 4 each iteration, i.e., approximately 2 bits are gained by each iteration.
From Archimedes's scheme, set r(n) = (2*low(n) + upp(n))/3, r(n) > Pi and the error decreases by a factor of approximately 16 for each iteration, i.e., approximately 4 bits are gained by each iteration. This is often called "Snellius acceleration".
For similar schemes see also A014549 (in this case with quadratically convergence), A093954, A129187, A129200, A188615, A195621, A202541.
Note that replacing "5/3" by "log(10)/log(4)" would be better in the first comment. (End)

Examples

			Just averaging the initial two triangles (3.89711) would yield Pi to one place of accuracy, i.e., the single digit '3'. Therefore a(0) = 0.
The first iteration yields, as the perimeters of the two hexagons, 4*sqrt(3) and 6. Their average is ~ 3.2320508 which is within 1/10 of the true value of Pi. Therefore a(1) = 1.
a(3) = 5 since it takes 5 iterations of Archimedes's algorithm to drive the averaged value of the circumscribed 96-gon and the inscribed 96-gon to yield a value within 0.001 of the correct value of Pi.
a(4) = 6 since it takes 6 iterations of Archimedes's algorithm to drive the averaged value of the circumscribed 3*2^6-gon and the inscribed 3*2^6-gon to yield a value within 0.0001 of the correct value of Pi.
		

References

  • Petr Beckmann, A History of Pi, 5th Ed. Boulder, Colorado: The Golem Press (1982).
  • Jonathan Borwein and David Bailey, Mathematics by Experiment, Second Edition, A. K. Peters Ltd., Wellesley, Massachusetts 2008.
  • Jonathan Borwein & Keith Devlin, The Computer As Crucible, An Introduction To Experimental Mathematics, A. K. Peters, Ltd., Wellesley, MA, Chapter 7, 'Calculating [Pi]' pp. 71-79, 2009.
  • Eli Maor, The Pythagorean Theorem, Princeton Science Library, Table 4.1, page 55.
  • Daniel Zwillinger, Editor-in-Chief, CRC Standard Mathematical Tables and Formulae, 31st Edition, Chapman & Hall/CRC, Boca Raton, London, New York & Washington, D.C., 2003, §4.5 Polygons, page 324.

Crossrefs

Cf. A000796.

Programs

  • Mathematica
    a[n_] := a[n] = N[2 a[n - 1] b[n - 1]/(a[n - 1] + b[n - 1]), 2^10]; b[n_] := b[n] = N[ Sqrt[ b[n - 1] a[n]], 2^10]; a[-1] = 2Sqrt[27]; b[-1] = a[-1]/2; f[n_] := Block[{k = 0}, While[ 10^n*((a[k] + b[k])/4 -Pi) > 1, k++]; k]; Array[f, 70]

Formula

Conjecture: There exists a c such that a(n) = floor(n*log(10)/log(4)+c); where c is in the range [0.08554,0.10264]. Critical values to narrow the range are believed to be at a(74), a(133), a(192), a(251), a(310), a(366), a(425), a(484). - A.H.M. Smeets, Jul 23 2018

A104841 The first n-digit prime occurring in the decimal expansion of Pi, A000796.

Original entry on oeis.org

3, 31, 653, 4159, 14159, 314159, 1592653, 28841971, 795028841, 5926535897, 93238462643, 141592653589, 9265358979323, 23846264338327, 841971693993751, 8628034825342117, 89793238462643383, 348253421170679821, 3832795028841971693, 89793238462643383279
Offset: 1

Views

Author

Zak Seidov, Mar 27 2005

Keywords

Comments

For the next n-digit primes, see the b-file (link).
Sequence A198344 gives the position of these primes withing the digits of Pi.

Crossrefs

Programs

  • PARI
    default(realprecision,2000); A104841(n)={for( c=0, default(realprecision)-n-2, Pi\.1^c%10 & ispseudoprime(p=Pi\.1^(n+c-1)%10^n) & return(p));error("Please increase default(realprecision) to calculate A104841("n").")}  \\ M. F. Hasler, Oct 23 2011
    
  • Python
    from sympy import S, isprime
    pi = "3"+str(S.Pi.n(10**5))[2:] # or load data from file
    def A104841_A198344(n): return next(((p, i+1) for i in range(len(pi)-n) if pi[i]!="0" and isprime(p:=int(pi[i:i+n]))), "not enough digits")
    print([A104841_A198344(n)[0] for n in range(1, 21)]) # Michael S. Branicky, Dec 28 2022

A198018 Yet unseen primes occurring within the first 1,2,3,4,... digits of Pi, A000796 (ordered according to position of last, then initial digit).

Original entry on oeis.org

3, 31, 41, 5, 314159, 14159, 4159, 59, 2, 1592653, 653, 53, 141592653589, 89, 415926535897, 5926535897, 6535897, 35897, 5897, 97, 7, 358979, 58979, 79, 589793, 9265358979323, 9323, 23, 93238462643, 462643, 643, 43, 433, 41592653589793238462643383, 89793238462643383, 38462643383, 2643383, 383, 83
Offset: 1

Views

Author

M. F. Hasler, Oct 20 2011

Keywords

Comments

Consider the first, then the first two, then the first three, ..., terms of A000796, i.e., decimal digits of Pi. Look whether the concatenation of a certain number of subsequent digits yields a prime which did not yet occur earlier (and thus necessarily involves the last of the considered digits). If so, add this prime to the sequence.
Contains A005042 as a subsequence.

Examples

			The first digit of the sequence is the prime a(1)=3.
The first two digits, "3.1", yield the prime a(2)=31.
In "3.14" there are no more primes. In "3.141" there is the prime a(3)=41.
In "3.1415" there is the prime a(4)=5.
In "3.14159" we have the primes 314159, 14159, 4159 and 59.
		

Crossrefs

Cf. A198019 ("new" primes ordered w.r.t. their size instead of starting position).

Programs

  • PARI
    {my(PI=digits(Pi\.1^30), seen=[]); for(i=1, #PI-1, for(j=1, i, my(p=fromdigits(PI[j..i])); !isprime(p) || setsearch(seen, p) || print1(p", ") || seen=setunion(seen,[p])))} \\ edited to use current PARI syntax by Andrew Howroyd and M. F. Hasler, May 10 2021
    
  • PARI
    {my(a=List()); for(m=0, precision(.)-3, my(pi=Pi\.1^m, p); for(k=0, m, !isprime(p=pi%10^(m-k+1)) && setsearch(Set(a), p) && listput(a,p))); a} \\ M. F. Hasler, May 10 2021

A198019 Primes occurring in the decimal expansion of Pi (A000796), ordered by position of last digit, then by size.

Original entry on oeis.org

3, 31, 41, 5, 59, 4159, 14159, 314159, 2, 53, 653, 1592653, 89, 141592653589, 7, 97, 5897, 35897, 6535897, 5926535897, 415926535897, 79, 58979, 358979, 589793, 23, 9323, 9265358979323, 43, 643, 462643, 93238462643, 433, 83, 383, 2643383, 38462643383, 89793238462643383, 41592653589793238462643383
Offset: 1

Views

Author

M. F. Hasler, Oct 20 2011

Keywords

Comments

Cf. A198018; the only difference is that here we list the "new primes" by increasing size (for a given subsequence of A000796).
Considering the first 1, 2, 3, 4,.... digits of the decimal expansion 3.14159... of Pi, record the primes that have not occurred earlier.
Sequence A198187 lists "duplicate" primes multiple times, each time they occur anew ending in another decimal place. - M. F. Hasler, Sep 01 2013

Examples

			In Pi = 3... we have the prime a(1)=3.
In Pi = 3.1.... we have the prime a(2)=31.
In Pi = 3.14... we have no new prime.
In Pi = 3.141.... we have the prime a(3)=41.
In Pi = 3.1415.... we have the new prime a(5)=5.
In Pi = 3.14159.... we have the new primes (listed in increasing order) a(6)=59, a(7)=4159, a(8)=14159 and a(9)=314159. [_M. F. Hasler_, Sep 01 2013]
		

Crossrefs

Programs

  • PARI
    {t=Pi; u=[]; for(i=0,precision(t), for(k=1,i+1, ispseudoprime(p=t\.1^i%10^k)& !setsearch(u,p)& (u=setunion(u,Set(p)))&print1(p",")))}

A158012 A000796(n)*A000796(n+1) mod 9.

Original entry on oeis.org

3, 4, 4, 5, 0, 0, 3, 3, 6, 6, 4, 0, 0, 0, 0, 6, 6, 6, 5, 6, 3, 3, 6, 3, 0, 6, 6, 6, 5, 0, 0, 0, 0, 7, 1, 5, 4, 0, 0, 7, 6, 0, 0, 0, 0, 0, 3, 8, 5, 0, 0, 4, 7, 0, 0, 0, 1, 0, 0, 7, 2, 0, 0, 6, 0, 0, 2, 8, 6, 6, 0, 0, 3, 7, 3, 3, 0, 0, 0, 0, 0, 3, 3, 7, 0, 0, 3, 5, 7, 1, 6, 3, 8, 2, 1, 7, 0, 0, 6, 0, 0, 7, 2, 4, 5, 0
Offset: 1

Views

Author

Paul Curtz, Mar 11 2009

Keywords

Comments

The product sequence of adjacent digits of pi is 3,4,4,5,45,18,12,30,15,15,40,72,63,63,27,6,6,24,32...

Programs

  • Mathematica
    Mod[Times@@@Partition[RealDigits[Pi,10,120][[1]],2,1],9] (* Harvey P. Dale, Jun 18 2024 *)

Extensions

Extended by R. J. Mathar, May 21 2009

A080597 Number of terms from the decimal expansion of Pi (A000796) which include every combination of n digits as consecutive subsequences.

Original entry on oeis.org

33, 607, 8556, 99850, 1369565, 14118313, 166100507, 1816743913, 22445207407, 241641121049, 2512258603208
Offset: 1

Views

Author

Martin Hasch (martin(AT)mathematik.uni-ulm.de), Feb 23 2003

Keywords

Examples

			a(2) = 607 because the first 607 digits of Pi contain every conceivable 2-digit subsequence but the first 606 digits do not. The combination (6, 8) appears as 606th and 607th term in A000796.
		

Crossrefs

Cf. A000796 (decimal expansion of Pi).
Cf. A036903 (= a(n) - 1).
Cf. A032510 (last digit string when scanning the decimal expansion of Pi for all n-digit strings).

Formula

a(n) = A036903(n) + 1. - Eric W. Weisstein, Sep 11 2013

Extensions

a(7)-a(8) from Piotr Idzik, Nov 01 2011
a(9)-a(11) from A036903(n) + 1 by Eric W. Weisstein, Sep 11 2013

A198344 Position of the first n-digit prime occurring in the decimal expansion of Pi, A000796.

Original entry on oeis.org

1, 1, 8, 3, 2, 1, 4, 34, 30, 5, 15, 2, 6, 17, 36, 82, 12, 87, 26, 12, 25, 215, 35, 18, 17, 3, 41, 17, 234, 17, 167, 92, 251, 15, 9, 12, 31, 1, 57, 290, 4, 99, 218, 502, 48, 164, 198, 201, 128, 7, 363, 143, 11, 138, 487, 32, 230, 82, 355, 515, 334, 186, 176, 223
Offset: 1

Views

Author

M. F. Hasler, Oct 23 2011

Keywords

Comments

Differs from A104842 in a(22), a(43), a(55),..., because here, leading zeros are not allowed.
The corresponding primes are listed in A104841.
Among the first 99 terms, even though values up to 825 occur, the values 1 and 17 occur 4 times, 12 and 57 occur 3 times, and numbers as large as 82, 164, 167 and 234 occur twice.

Examples

			a(1)=1 because the initial digit "3" of Pi is prime.
a(2)=a(6)=a(38)=1 because the first 2, 6, and 38 digits of Pi (including the initial 3) also form the primes 31, 314159 and 31415926535897932384626433832795028841, cf. A005042 and A060421.
		

Crossrefs

Programs

A064823 Number of indices 1 <= i <= n with A000796(i)=A000796(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 3, 1, 2, 1, 3, 3, 2, 4, 2, 2, 2, 3, 3, 3, 5, 6, 3, 7, 4, 2, 4, 4, 1, 5, 4, 5, 4, 3, 5, 3, 4, 4, 6, 8, 7, 8, 9, 4, 5, 5, 2, 6, 6, 6, 3, 9, 5, 5, 10, 6, 7, 7, 11, 7, 10, 4, 6, 7, 6, 5, 8, 5, 6, 8, 8, 7, 9, 6, 9, 12, 13, 10, 8, 10, 11, 7, 11, 9, 12, 11, 8, 12, 10, 12, 7, 8, 7
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 23 2001

Keywords

Crossrefs

A000796 is the sequence of decimal digits of Pi.

Programs

  • Haskell
    a064823_list = f a000796_list $ replicate 10 0 where
       f (d:ds) cs = (v + 1) : f ds (us ++ (v + 1) : vs) where
         (us, v:vs) = splitAt d cs
    -- Reinhard Zumkeller, Jul 14 2013
  • Mathematica
    terms = 100; Clear[cnt]; cnt[_] = n = 0;
    Do[a[++n] = ++cnt[k], {k, RealDigits[Pi, 10, terms][[1]]}];
    a /@ Range[terms] (* Jean-François Alcover, Nov 15 2019 *)

A099816 Bisection of A000796 (decimal expansion of Pi).

Original entry on oeis.org

3, 4, 5, 2, 5, 5, 9, 9, 2, 8, 6, 6, 3, 8, 2, 9, 0, 8, 4, 9, 1, 9, 9, 3, 5, 0, 8, 0, 7, 9, 4, 9, 3, 7, 1, 4, 6, 8, 2, 8, 9, 6, 8, 3, 8, 5, 4, 1, 7, 6, 9, 2, 4, 0, 6, 1, 2, 2, 0, 6, 7, 9, 8, 4, 0, 5, 0, 8, 2, 1, 2, 3, 9, 0, 1, 8, 8, 1, 7, 5, 2, 4, 0, 7, 1, 3, 5, 1, 0, 5, 9, 4, 6, 2, 4, 9, 4, 3, 3, 1, 6, 4, 8, 1, 9
Offset: 1

Views

Author

N. J. A. Sloane, Nov 19 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Take[ RealDigits[Pi, 10, 220][[1]], {1, 220, 2}]

Extensions

a(54)-a(105) from Jonathan Vos Post, Mar 22 2006
Showing 1-10 of 1164 results. Next