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

A104821 Positions of prime numbers A104820 in A104819.

Original entry on oeis.org

3, 297, 4, 7, 12, 45, 330, 391, 82, 85, 92, 121, 251, 124, 214, 129, 304, 130, 353, 131, 137, 139, 144, 160, 163, 192, 286, 340, 146, 315, 150, 151, 158, 144, 160, 163, 192, 286, 340, 144, 160, 163, 192, 286, 340, 170, 172, 144, 160, 163, 192, 286, 340, 207
Offset: 1

Views

Author

Zak Seidov, Mar 27 2005

Keywords

Crossrefs

Formula

A104821(n)=Position[A104819, A104820(n)]

A104824 Primes from merging of 4 successive digits in decimal expansion of Pi.

Original entry on oeis.org

4159, 5897, 9323, 8419, 1693, 8209, 9749, 5923, 2089, 2803, 4211, 7253, 8111, 1117, 7019, 193, 8521, 6229, 1097, 6659, 8233, 7867, 1201, 9091, 5669, 4603, 4861, 3607, 4127, 631, 5881, 5209, 9209, 4091, 3643, 5903, 11, 113, 6521, 1511, 1609, 9433
Offset: 1

Views

Author

Zak Seidov, Mar 27 2005

Keywords

Comments

Leading zeros permitted. - Harvey P. Dale, Dec 09 2013

Crossrefs

Programs

  • Mathematica
    With[{pi = FromDigits/@Partition[RealDigits[Pi, 10, 500][[1]], 4, 1]}, Select[pi, PrimeQ]] (* Vincenzo Librandi, Apr 21 2013 *)

A104826 Primes from merging of 6 successive digits in decimal expansion of Pi.

Original entry on oeis.org

314159, 358979, 589793, 462643, 971693, 169399, 592307, 348253, 534211, 808651, 844609, 822317, 725359, 502841, 102701, 288109, 612847, 337867, 104543, 815209, 925409, 917153, 665213, 951941
Offset: 1

Views

Author

Zak Seidov, Mar 27 2005

Keywords

Comments

Leading zeros are not permitted, so each term is 6 digits in length. - Harvey P. Dale, Oct 23 2011

Crossrefs

Programs

  • Mathematica
    With[{len=6},FromDigits/@Select[Partition[RealDigits[Pi,10,1000][[1]], len,1],PrimeQ[FromDigits[#]]&&IntegerLength[FromDigits[#]]==len&]] (* Harvey P. Dale, Oct 23 2011 *)

A104825 Primes from merging of 5 successive digits in decimal expansion of Pi.

Original entry on oeis.org

14159, 35897, 58979, 38327, 97169, 71693, 39937, 9749, 30781, 20899, 34211, 64709, 47093, 82231, 84811, 46229, 81097, 56659, 66593, 86783, 85669, 66923, 34603, 93607, 60631, 9209, 25409, 54091, 25903, 113, 33053, 65213, 13841, 51941, 94151
Offset: 1

Views

Author

Zak Seidov, Mar 27 2005

Keywords

Comments

Because leading zeros are permitted, some terms have fewer than 5 digits. - Harvey P. Dale, Mar 01 2023

Crossrefs

Programs

  • Mathematica
    With[{pi=FromDigits/@Partition[RealDigits[Pi,10,2000][[1]],5,1]}, Select[pi,PrimeQ]] (* Harvey P. Dale, Oct 18 2011 *)

A104842 Position of the first sequence of n subsequent digits of Pi which form a prime.

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, 133, 35, 18, 17, 3, 41, 17, 234, 17, 167, 92, 251, 15, 9, 12, 31, 1, 57, 290, 4, 99, 98, 502, 48, 164, 198, 201, 128, 7, 363, 143, 11, 138, 196, 32, 230, 82, 292, 515, 334, 186, 176, 223, 57, 135, 35
Offset: 1

Views

Author

Zak Seidov, Mar 27 2005

Keywords

Comments

Note that values with indices n = 22, 43, 55, ... are positions of primes with leading zeros, which is in particular manifest from a(42)=99, a(43)=98. See A198344 for the position of the "true" n-digit primes listed in A104841. - M. F. Hasler, Oct 23 2011

Examples

			a(1)=1 since the first single-digit prime found, 3, is at first place, hence a(1)=1,
a(2)=1 since the first two-digit prime found, 31, is at first place, hence a(2)=1,
a(3)=8 since the first three-digit prime found, 653, is at 8th place, hence a(3)=8, ...
		

Crossrefs

Programs

  • Mathematica
    pi = RealDigits[Pi, 10, 100][[1]]; f[n_] := Block[{k = 1}, While[ !PrimeQ[ FromDigits[ Take[pi, {k, k + n - 1}]]], k++ ]; k]; Table[ f[n], {n, 67}] (* Robert G. Wilson v, Mar 29 2005 *)
  • PARI
    a(n)={for(c=-1,default(realprecision)-n-2,ispseudoprime(Pi\.1^(n+c)%10^n)&return(c+2));error("Insufficient realprecision, please increase.")}  \\  M. F. Hasler, Oct 23 2011

Extensions

More terms from a(33) onward from Robert G. Wilson v, Mar 29 2005

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

A104830 Primes from merging of 10 successive digits in decimal expansion of Pi.

Original entry on oeis.org

5926535897, 4197169399, 1693993751, 7510582097, 348253421, 4825342117, 5822317253, 812848111, 2841027019, 8521105559, 8954930381, 4756482337, 2712019091, 5432664821, 3266482133, 6072602491, 5588174881, 8815209209
Offset: 1

Views

Author

Zak Seidov, Mar 27 2005

Keywords

Comments

Leading zeros are permitted, so some terms are less than 10 digits in length. - Bruno Berselli, May 01 2013

Crossrefs

Programs

  • Mathematica
    With[{pi = FromDigits/@Partition[RealDigits[Pi, 10, 500][[1]], 10, 1]}, Select[pi, PrimeQ]] (* Vincenzo Librandi, Apr 21 2013 *)

A104820 Primes with distinct digits appearing in partition of decimal expansion of Pi.

Original entry on oeis.org

53, 5897, 643, 1693, 5, 815209, 29, 13, 857, 2, 983, 367, 3, 9463, 2473, 7, 71, 7481, 8467, 560827, 7, 7, 409, 24953, 7, 631859, 2, 526193, 31, 8753, 17, 17, 857, 61, 89, 9721, 7, 415069, 59, 53, 31, 983, 8175463, 71, 601, 5, 9467, 7, 31, 367, 70289, 47, 19
Offset: 1

Views

Author

Zak Seidov, Mar 27 2005

Keywords

Examples

			Start with decimal expansion 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...
Part the sequence to the sections with distinct digits: s={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},...
Then sequence are primes from digits of s(): 53, 5897, 643,  ...
		

Crossrefs

A104823 Primes from merging of three successive digits in decimal expansion of Pi.

Original entry on oeis.org

653, 643, 433, 383, 419, 197, 971, 937, 751, 97, 307, 89, 421, 211, 67, 821, 823, 647, 709, 223, 317, 359, 811, 701, 19, 193, 521, 211, 229, 881, 109, 97, 659, 593, 461, 823, 233, 337, 271, 19, 821, 607, 491, 127
Offset: 1

Views

Author

Zak Seidov, Mar 27 2005

Keywords

Comments

Leading zeros are permitted, so not every term is 3 digits in length. - Harvey P. Dale, Oct 24 2011

Crossrefs

Programs

  • Mathematica
    With[{pi = FromDigits/@Partition[RealDigits[Pi, 10, 500][[1]], 3, 1]}, Select[pi, PrimeQ]] (* Vincenzo Librandi, Apr 23 2013 *)

A104827 Primes from merging of 7 successive digits in decimal expansion of Pi allowing leading zeros.

Original entry on oeis.org

1592653, 6535897, 2643383, 5028841, 6939937, 3993751, 348253, 1170679, 8086513, 5822317, 1725359, 4930381, 2881097, 4612847, 3165271, 2712019, 1201909, 4914127, 917153, 1133053, 3841469, 1469519, 6951941, 9433057
Offset: 1

Views

Author

Zak Seidov, Mar 27 2005

Keywords

Comments

Leading zeros are permitted so some terms may have fewer than 7 digits. For example, 223, 907, 3137, and 4229 are all terms. - Harvey P. Dale, May 24 2020

Crossrefs

Programs

  • Mathematica
    With[{pi = FromDigits/@Partition[RealDigits[Pi, 10, 500][[1]], 7, 1]}, Select[pi, PrimeQ]] (* Vincenzo Librandi, Apr 21 2013 *)
Showing 1-10 of 24 results. Next