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

A195834 Increasing primes formed from the decimal expansion of Pi, contiguous and smallest.

Original entry on oeis.org

3, 14159, 26535897932384626433832795028841971693993751058209, 74944592307816406286208998628034825342117067982148086513282306647093
Offset: 1

Views

Author

Omar E. Pol, Oct 21 2011

Keywords

Comments

Leading zero not allowed thus forcing continuation of previous term. All digits of pi are in the concatenion of all terms of this sequence.

Crossrefs

Formula

a(n) < a(n+1).

Extensions

More terms from D. S. McNeil, Oct 22 2011

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

A138758 Index of A001203(n) (continued fraction for Pi) in A000040 (primes), or 0 if A001203(n) is not prime.

Original entry on oeis.org

2, 4, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 2, 6, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 2, 3, 0, 0, 0, 0, 0, 4, 0, 1, 2, 4, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 1, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 3, 0, 0, 1
Offset: 1

Views

Author

M. F. Hasler, Mar 31 2008

Keywords

Examples

			This sequence starts 2,4,0,0,... since the 1st and 2nd terms of the continued fraction expansion of Pi, A001203 = (3, 7, 15, 1, ...) are the 2nd resp. 4th primes, while the next two terms are not primes.
		

Crossrefs

Programs

  • PARI
    default(realprecision,1000); t=contfrac(Pi); vector(#t,i,isprime(t[i])*primepi(t[i]))

Formula

a(n) = A000720(A001203(n)) * A010051(A001203(n)).

A198187 Primes from the decimal expansion of Pi, sorted first by the final digit index and then by length.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

In this sequence, primes are listed each time they occur (again) with a new ending position, in contrast to A198019 where only the first occurrence of each prime is listed. - M. F. Hasler, Sep 02 2013

Examples

			The first digit is 3, which is prime, so a(1) = 3.
The second digit is 1, which is no prime, but 31 is prime, so a(2) = 31.
The third digit is 4, which does not end any prime.
The fourth digit is 1, not prime, but 41 is prime, so a(3) = 41.
		

Crossrefs

Programs

  • PARI
    v=[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]
    for(n=1,#v,x=0;p=1;forstep(k=n,1,-1,x+=p*v[k];p*=10;if(v[k]&&isprime(x),print1(x", "))))

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

A282973 Primes in A011546.

Original entry on oeis.org

3, 31, 314159, 314159265359
Offset: 1

Views

Author

XU Pingya, Feb 25 2017

Keywords

Examples

			a(5) = A011546(1902) = 314159...066118631 is a prime with 1902 digits.
a(6) = A011546(3971) = 314159...411010447.
a(7) = A011546(5827) = 314159...690496521.
a(8) = A011546(16208) = A005042(5) = 314159....943936307.
For n<=17511, there are eight primes in sequence A011546(n).
In addition, because of round(Pi*10^47576) = floor(Pi*10^47576), and A011546(47577)(=A005042(6)) is a prime. Thus,  A011546(47577) will appear in here. A011546(613373)(=A005042(8)) as well. But A011546(78073)(=A005042(7)+1) is not prime.
		

Crossrefs

Programs

  • Mathematica
    Do[If[PrimeQ[Round[Pi*10^(n-1)]],Print[Round[Pi*10^(n-1)]]],{n,17511}]
    Select[Module[{nn=20,pid},pid=RealDigits[Pi,10,nn+2][[1]];Table[Floor[(FromDigits[ Take[ pid,n+1]])/10+1/2],{n,nn}]],PrimeQ] (* Harvey P. Dale, Jan 01 2023 *)

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

A065839 Primes found in A065838.

Original entry on oeis.org

3, 13, 53, 859, 880571, 230836658783, 18727694659923768688081143062632211180505377, 1448985191439414787314128433365601157107793684026416650771108564122239
Offset: 1

Views

Author

Patrick De Geest, Nov 24 2001

Keywords

Crossrefs

A245571 a(n) is the smallest prime number with at least two digits formed by the concatenation of the subsequent digits of Pi, starting at the n-th digit, ignoring the decimal point.

Original entry on oeis.org

31, 14159, 41, 1592653, 59, 9265358979323, 26535897932384626433832795028841971693993751058209, 653, 53, 35897, 5897, 89, 97, 79, 9323, 32384626433832795028841971693993751058209749445923078164062862089986280348253421, 23, 38462643383
Offset: 1

Views

Author

Felix Fröhlich, Aug 22 2014

Keywords

Comments

a(19) has 3057 digits. - Robert Israel, Aug 27 2014
a(20) = 462643. - Felix Fröhlich, Aug 30 2014
a(21) has >= 3490 digits, a(22) = 2643383, a(22)-a(42) have 20 or fewer digits. - Chai Wah Wu, Sep 24 2014

Examples

			a(4) = 1592653, because starting at the 4th digit in the expansion, the smallest substring of the digits of Pi forming a prime number is 3.14|1592653|589...
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to use up to N+1 digits of pi.
    nmax:= 30: # to get up to a(nmax), if possible.
    S:= floor(10^N*Pi):
    L:= ListTools:-Reverse(convert(S,base,10)):
    for n from 1 to nmax do
      p:= L[n];
      for k1 from n+1 to N+1 do
        p:= 10*p + L[k1];
        if isprime(p) then break fi
      od:
      if k1 > N+1 then
        A[n]:= "Ran out of digits";
        break
       else
        A[n]:= p
      end
    od:
    seq(A[i],i=1..n-1); # Robert Israel, Aug 27 2014
  • Python
    from sympy.mpmath import *
    from sympy import isprime
    def A245571(n):
        mp.dps = 1000+n
        s = nstr(pi,mp.dps)[:-1].replace('.','')[n-1:]
        for i in range(len(s)-1):
            p = int(s[:i+2])
            if p > 10 and isprime(p):
                return p
        else:
            return 'Ran out of digits'
    # Chai Wah Wu, Sep 16 2014, corrected Chai Wah Wu, Sep 24 2014
Previous Showing 11-20 of 29 results. Next