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

A005042 Primes formed by the initial digits of the decimal expansion of Pi.

Original entry on oeis.org

3, 31, 314159, 31415926535897932384626433832795028841
Offset: 1

Views

Author

Keywords

Comments

The next term consists of the first 16208 digits of Pi and is too large to show here (see A060421). Ed T. Prothro found this probable prime in 2001.
A naive probabilistic argument suggests that the sequence is infinite. - Michael Kleber, Jun 23 2004

References

  • M. Gardner, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A060421 for further terms.

Programs

  • Maple
    Digits := 130; n0 := evalf(Pi); for i from 1 to 120 do t1 := trunc(10^i*n0); if isprime(t1) then print(t1); fi; od:
  • Mathematica
    a = {}; Do[k = Floor[Pi 10^n]; If[PrimeQ[k], AppendTo[a, k]], {n, 0, 160}]; a (* Artur Jasinski, Mar 26 2008 *)
    nn=1000;With[{pidigs=RealDigits[Pi,10,nn][[1]]},Select[Table[FromDigits[ Take[pidigs,n]],{n,nn}],PrimeQ]] (* Harvey P. Dale, Sep 26 2012 *)
  • PARI
    c=Pi;for(k=0,precision(c),isprime(c\.1^k) & print1(c\.1^k,",")) \\ - M. F. Hasler, Sep 01 2013

Formula

a(n) = floor(10^(A060421(n)-1)*A000796), where A000796 is the constant Pi = 3.14159... . - M. F. Hasler, Sep 02 2013

A065840 Numbers n such that the first n quaternary digits found in the base-10 expansion of Pi form a prime (when the decimal point is ignored).

Original entry on oeis.org

1, 2, 3, 5, 10, 19, 72, 115, 220, 315, 375, 12408
Offset: 1

Views

Author

Patrick De Geest, Nov 24 2001

Keywords

Comments

In other words, take the decimal expansion of Pi, drop any digits greater than 4, omit the decimal point and look for prefixes in the resulting string which form base-4 primes.
Numbers n such that A065838(n) is prime.
The next term in the sequence, if it exists, is greater than 10000. - Nathaniel Johnston, Nov 15 2010

Examples

			E.g., the first a(5) or 10 quaternary digits of Pi are 31.12332323{4} and 3112332323{4} is the prime 880571{10}.
		

Crossrefs

Programs

  • Mathematica
    p = First[ RealDigits[ Pi, 10, 10^5]]; p = p[[ Select[ Range[10^5], p[[ # ]] == 0 || p[[ # ]] == 1 || p[[ # ]] == 2 || p[[ # ]] == 3 & ]]]; Do[ If[ PrimeQ[ FromDigits[ Take[p, n], 4]], Print[ n]], {n, 1, 4000} ]

Extensions

a(12) from Chai Wah Wu, Apr 07 2020

A047658 Numbers k such that the initial k digits in decimal portion of Pi form a prime number.

Original entry on oeis.org

5, 12, 281, 547, 6205, 16350
Offset: 1

Views

Author

Keywords

Comments

Conjecture: this sequence is finite. - Carlos Rivera
Rivera's conjecture that this sequence is finite conflicts with heuristics; the next entry is almost certainly 6205, since floor((Pi-3)*10^6205) is (very) probably prime, though its proof may take decades. - David Broadhurst, Nov 08 2000
Floor((Pi-3)*10^6205) is a strong pseudoprime to all (1229) prime bases a < 10000 (the test took 45 minutes). - Joerg Arndt, Jan 16 2011
Terms for n>=5 are only probable primes. - Dmitry Kamenetsky, Aug 03 2015
Floor((Pi-3)*10^16350) is a probable prime, checked with 25 iterations of the Miller-Rabin test. - Dmitry Kamenetsky, Aug 05 2015
The next term is greater than 65400. - Dmitry Kamenetsky, Aug 09 2015
The next term is greater than 100000. - Michael S. Branicky, Sep 29 2024

Examples

			5 gives 14159 (prime); 12 gives 141592653589 (prime) and so on.
		

Crossrefs

Cf. A000796 (Pi), A060421, A064118.

Programs

  • Mathematica
    nn=1000; d=RealDigits[Pi-3, 10, nn][[1]]; Select[Range[nn], PrimeQ[FromDigits[Take[d, #]]] &]
  • PARI
    is(n)=isprime((Pi-3)*10^n\1) \\ Charles R Greathouse IV, Aug 28 2015
    
  • Python
    from sympy import S, isprime
    pi_digits = str(S.Pi.n(10**5))[2:-1]
    def afind():
        kint = 0
        for k in range(len(pi_digits)):
            kint = 10*kint + int(pi_digits[k])
            if isprime(kint):
                print(k+1, end=", ")
    afind() # Michael S. Branicky, Jan 29 2023

A089281 Smallest prime factor of floor(Pi*10^n).

Original entry on oeis.org

3, 31, 2, 3, 5, 314159, 2, 2, 3, 3, 5, 2, 13, 163, 43, 13, 2, 317213509, 2, 2, 2, 2, 2, 2, 83, 41, 2, 3, 2, 3, 3, 5, 2, 2, 2, 2, 2, 31415926535897932384626433832795028841, 13, 59, 3, 2, 3, 3, 3, 3, 3, 31, 3, 1657, 2, 3, 2, 2, 2, 29, 13, 2, 3, 2
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 30 2003

Keywords

Examples

			n = 10: floor(Pi*10^10) = 31415926535 = 5*7*31*28954771: a(10) = 5.
		

Crossrefs

Cf. A078604, A000796 (decimals of Pi), A020639 (smallest prime fector), A011545 (numbers made from inital digits of Pi), A060421 (1 + indices of primes in this sequence).

Programs

  • Mathematica
    a[n_] := FactorInteger[IntegerPart[Pi*10^n]][[1, 1]];
    Table[a[n], {n, 0, 59}]  (* Peter Luschny, Mar 15 2024 *)
  • PARI
    a(n) = factor(floor(Pi*10^n))[1, 1]; \\ Michel Marcus, Dec 28 2013
    
  • PARI
    A089281(n)={localprec(n+3); factor(Pi\10^-n)[1, 1]} \\ M. F. Hasler, Mar 15 2024

Formula

a(n) = A020639(A011545(n)).
a(n) is prime (<=> in A000040) iff n+1 is in A060421. - M. F. Hasler, Mar 15 2024

Extensions

More terms from Ray Chandler, Oct 30 2003
More terms from Ryan Moore, Dec 27 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

A078604 Largest prime factor of the integer formed by truncating the decimal expansion of Pi to n places.

Original entry on oeis.org

3, 31, 157, 349, 103, 314159, 392699, 8263, 7853, 9786893, 28954771, 157079632679, 68246533, 4304347, 67649047, 1002742628021, 1170899, 990371647, 14523877, 1186001, 1023100457, 451661057, 1492315939, 381315143078063, 950007203269
Offset: 0

Views

Author

Jason Earls, Dec 09 2002

Keywords

Examples

			a(3) = 157 since 314 = 2*157.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := FactorInteger[ IntegerPart[ Pi*10^(n - 1)]][[-1, 1]]; Array[f, 23] (* Robert G. Wilson v, May 30 2015 *)
  • PARI
    a(n) = vecmax(factor(floor(Pi*10^n))[, 1]); \\ Michel Marcus, Dec 28 2013

Formula

a(n) = A006530(A011545(n)). - Michel Marcus, Dec 28 2013
a(n) = A011545(n) iff n is a term in A060421. - Robert G. Wilson v, May 30 2015

Extensions

More terms from Ryan Moore, Dec 28 2013

A065832 Numbers k such that the first k binary digits found in the base-10 expansion of Pi form a prime (when the decimal point is ignored).

Original entry on oeis.org

2, 4, 10, 24, 29, 34, 43, 62, 76, 351, 778, 2736, 4992, 7517, 22044, 40390, 204505
Offset: 1

Views

Author

Patrick De Geest, Nov 24 2001

Keywords

Comments

In other words, take the decimal expansion of Pi, drop any digits greater than 1, omit the decimal point and look for prefixes in the resulting string which form base-2 primes.
Numbers k such that A065830(k) is prime.

Examples

			The first a(3)=10 binary digits of Pi are 1101110001_2 which is prime 881_10.
		

Crossrefs

Programs

  • Mathematica
    p = First[ RealDigits[ Pi, 10, 10^5]]; p = p[[ Select[ Range[10^5], p[[ # ]] == 0 || p[[ # ]] == 1 & ]]]; Do[ If[ PrimeQ[ FromDigits[ Take[p, n], 2]], Print[n]], {n, 1, Length[p] } ]

Extensions

More terms from Robert G. Wilson v, Nov 30 2001
a(15)-a(16) from Chai Wah Wu, Apr 06 2020
a(17) from Michael S. Branicky, Sep 25 2024

A210706 Numbers k such that floor[ 3^(1/3)*10^k ] is prime.

Original entry on oeis.org

23, 80, 2487
Offset: 1

Views

Author

M. F. Hasler, Aug 31 2013

Keywords

Comments

Inspired by prime curios about 4957 (cf. LINKS), one of which honors the late Bruce Murray (Nov 30 1931 - Aug 29 2013).
Meant to be a "condensed" version of A210704, see there for more.
Alternate definition: Numbers k such that concatenation of the first (k+1) digits of A002581 yields a prime.

Examples

			t = 3^(1/3) = 1.44224957030740838232163831... multiplied by 10^23 yields
t*10^23 = 144224957030740838232163.831..., the integer part of which is the prime A210704(1), therefore a(1)=23.
		

Crossrefs

Cf. A002581 = decimal expansion of 3^(1/3).
Cf. A065815 (analog for gamma), A060421 (1+ analog for Pi), A064118 (1+ analog for exp(1)), A119344 (1 + analog for sqrt(3)), A136583 (1+ analog for sqrt(10)).

Programs

  • PARI
    \p2999
    t=sqrtn(3,3);for(i=1,2999,ispseudoprime(t\.1^i)&print1(i","))

Formula

a(n) = (length of A210704(n)) - 1, where "length" means number of decimal digits.

A282974 Numbers k such that A011546(k-1) is a prime.

Original entry on oeis.org

1, 2, 6, 12, 1902, 3971, 5827, 16208, 47577
Offset: 1

Views

Author

XU Pingya, Feb 25 2017

Keywords

Comments

Round(k)=floor(k) or floor(k)+1, so if round(k)=floor(k) and floor(k) is a prime number, then round(k) is also prime. Thus 47577 = A060421(6) and 613373 = A060421(8) are also terms.
The corresponding primes are in A282973.
a(10) > 2^16. - Lucas A. Brown, Apr 05 2021

Crossrefs

Programs

  • Mathematica
    Do[If[PrimeQ[Round[Pi*10^(n-1)]],Print[n]],{n,17511}]
  • PARI
    default(realprecision, 10^5); x=Pi;
    is(k) = ispseudoprime(round(x*10^k--)); \\ Jinyuan Wang, Mar 27 2020

Extensions

a(8) and a(9) from Lucas A. Brown, Apr 05 2021
Definition corrected by Lucas A. Brown, Apr 05 2021

A065831 Primes found in A065830.

Original entry on oeis.org

3, 13, 881, 14436001, 461952047, 14782465513, 7568622343067, 3968137871002260679, 65013970878501038966321
Offset: 1

Views

Author

Patrick De Geest, Nov 24 2001

Keywords

Crossrefs

Formula

a(n) = A065830(A065832(n)). - Jinyuan Wang, Aug 31 2021
Showing 1-10 of 15 results. Next