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

A066269 Indices of primes in A066268.

Original entry on oeis.org

2, 3, 33
Offset: 1

Views

Author

Patrick De Geest, Dec 16 2001

Keywords

Comments

The 33rd term, prime 16268...99999, contains 759 digits.
Next term is bigger than 150. - Stefan Steinerberger, May 06 2007
Next term is bigger than 450. - Michael S. Branicky, Nov 14 2024

Crossrefs

Programs

  • Mathematica
    Select[Range[65], PrimeQ[Product[Product[Prime[i],{i,1,n}],{n,1,#}]-1]&] (* Stefan Steinerberger, Apr 12 2006 *)

Extensions

Offset changed from 0 to 1 by Harry J. Smith, Feb 08 2010

A057706 Smaller of twin primes whose average is a primorial number.

Original entry on oeis.org

5, 29, 2309
Offset: 1

Views

Author

Labos Elemer, Oct 24 2000

Keywords

Comments

According to Caldwell, the next term, if it exists, has more than 100000 digits. - T. D. Noe, May 08 2012

Examples

			(5+7)/2 = 6 = 2*3, (29+31)/2 = 30 = 2*3*5, (2309+2311)/2 = 2310 = 2*3*5*7*11.
		

Crossrefs

Cf. A000040 (primes), A002110 (primorials, p#).
Cf. A006862 (Euclid, p#+1), A005234 (prime p#+1), A014545 (index prime p#+1).
Cf. A057588 (Kummer, p#-1), A006794 (prime p#-1), A057704 (index prime p#-1).

Programs

  • Mathematica
    Select[FoldList[Times, Prime@ Range@ 40], AllTrue[# + {-1, 1}, PrimeQ] &] - 1 (* Michael De Vlieger, Jul 15 2017 *)
  • Python
    from sympy import isprime, prime, primerange
    def auptoprimorial(limit):
      phash, alst = 1, []
      for p in primerange(1, prime(limit)+1):
        phash *= p
        if isprime(phash-1) and isprime(phash+1): alst.append(phash-1)
      return alst
    print(auptoprimorial(5)) # Michael S. Branicky, May 29 2021

Extensions

Offset corrected by Arkadiusz Wesolowski, May 08 2012

A066268 Product of first n primorials - 1.

Original entry on oeis.org

1, 11, 359, 75599, 174635999, 5244319079999, 2677277333530799999, 25968760179275365451999999, 5793445238736255798985527239999999, 37481813439427687898244906452608585199999999, 7517370874372838151564668004911177464757864075999999999
Offset: 1

Views

Author

Patrick De Geest, Dec 16 2001

Keywords

Examples

			a(3) = (2)*(2*3)*(2*3*5) - 1 = 359.
		

Crossrefs

Programs

  • Mathematica
    Table[Times@@Table[Times@@Prime[Range[n]],{n,k}]-1,{k,40}]
    (* or *)
    pr2=1; Table[pr1=1; Do[pr1=pr1*Prime[n],{n,k}]; pr2=pr2*pr1; pr2-1,{k,40}] (* Jayanta Basu, May 12 2013 *)
  • PARI
    a(n) = -1 + prod(k=1, n, prime(k)^(n-k+1)) \\ Andrew Howroyd, Dec 10 2024

Formula

a(n) = A006939(n) - 1. - Andrew Howroyd, Dec 10 2024

Extensions

Offset changed from 0 to 1 by Harry J. Smith, Feb 08 2010

A060255 Smaller of twin primes {p, p+2} whose average p+1 = k*q is the least multiple of the n-th primorial number q such that k*q-1 and k*q+1 are twin primes.

Original entry on oeis.org

3, 5, 29, 419, 2309, 180179, 4084079, 106696589, 892371479, 103515091679, 4412330782859, 29682952539239, 22514519501013539, 313986271960080719, 22750921955774182169, 912496437361321252439, 26918644902158976946979, 1290172194953476680815969, 1901713815361424627522739779
Offset: 1

Views

Author

Labos Elemer, Mar 22 2001

Keywords

Comments

a(349) has 1001 digits. - Michael S. Branicky, Apr 19 2025

Examples

			a(13) = -1 + (2*3*5*7*...*41)*k(13) = 304250263527210*74 and {22514519501013539, 22514519501013542} are the corresponding primes; k(13)=74 is the smallest suitable multiplier. Twin primes obtained from primorial numbers with k=1 multiplier seem to be much rarer (see A057706).
For j=1,2,3,4,5,6, a(j)=A001359(1), A059960(1), A060229(1), A060230(1), A060231(1), A060232(1) respectively.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(q = prod(k=1, n, prime(k))); for(k=1, oo, if (isprime(q*k-1) && isprime(q*k+1), return(q*k-1)););} \\ Michel Marcus, Jul 10 2018
    
  • Python
    from itertools import count
    from sympy import primorial, isprime
    def a(n):
        p = primorial(n)
        return next(m-1 for m in count(p, p) if isprime(m-1) and isprime(m+1))
    print([a(n) for n in range(1, 20)]) # Michael S. Branicky, Apr 18 2025

Formula

a(n) = p = k(n)*q(n)-1, where q(n)=A002110(n) and k(n)=A060256(n) is the smallest integer whose multiplication by the n-th primorial yields p+1.

Extensions

a(2)=5 corrected by Ray Chandler, Apr 03 2009
a(18) and beyond from Michael S. Branicky, Apr 18 2025

A103515 Primes of the form primorial P(k)*2^n-1 with minimal n, n>=0, k>=2.

Original entry on oeis.org

5, 29, 419, 2309, 30029, 1021019, 19399379, 892371479, 51757545839, 821495767572479, 14841476269619, 304250263527209, 54873078184468933509119, 2459559130353965639, 521426535635040715679, 15751252788463309939261439
Offset: 1

Views

Author

Lei Zhou, Feb 15 2005

Keywords

Comments

Conjecture: sequence is defined for all k>=2

Examples

			P(2)*2^0-1=3*2-1=5 is prime, so a(2)=5;
P(4)*2^1-1=7*5*3*2*2-1=419 is prime, so a(4)=419;
		

Crossrefs

Programs

  • Mathematica
    nmax = 2^2048; npd = 2; n = 2; npd = npd*Prime[n]; While[npd < nmax, tt = 1; cp = npd*tt - 1; While[ ! (PrimeQ[cp]), tt = tt*2; cp = npd*tt - 1]; Print[cp]; n = n + 1; npd = npd*Prime[n]]

A103782 a(n) = minimal m >= 0 that makes primorial P(n)*2^m-1 prime.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 2, 3, 12, 1, 0, 22, 2, 4, 13, 12, 6, 1, 4, 1, 4, 0, 2, 9, 5, 6, 2, 1, 9, 17, 22, 7, 19, 73, 23, 12, 5, 27, 33, 64, 33, 5, 7, 41, 44, 35, 29, 3, 19, 6, 26, 5, 11, 9, 33, 34, 16, 63, 46, 8, 4, 24, 48, 0, 11, 0, 26, 6, 25, 17, 31, 6, 46, 33, 46, 17, 8, 61, 12, 23, 76, 20, 17
Offset: 2

Views

Author

Lei Zhou, Feb 15 2005

Keywords

Comments

The values of n in A103515

Examples

			P(2)*2^0-1=5 is prime, so a(2)=0; P(9)*2^2-1=892371479 is prime, so a(9)=2;
		

Crossrefs

Programs

  • Mathematica
    nmax = 2^2048; npd = 2; n = 2; npd = npd*Prime[n]; While[npd < nmax, tn = 0; tt = 1; cp = npd*tt - 1; While[(cp > 1) && (! (PrimeQ[cp])), tn = tn + 1; tt = tt*2; cp = npd*tt - 1]; Print[tn]; n = n + 1; npd = npd*Prime[n]]

A104876 Semiprimes of the form primorial(k) - 1.

Original entry on oeis.org

209, 510509, 6469693229, 200560490129, 13082761331670029, 1922760350154212639069, 557940830126698960967415389, 40729680599249024150621323469, 2305567963945518424753102147331756069, 232862364358497360900063316880507363069
Offset: 1

Views

Author

Jonathan Vos Post, Mar 28 2005

Keywords

Examples

			4# - 1 = 209 = 11 * 19.
7# - 1 = 510509 = 61 * 8369.
10# - 1 = 6469693229 = 79 * 81894851.
		

Crossrefs

Programs

  • Mathematica
    Bigomega[n_]:=Plus@@Last/@FactorInteger[n]; SemiprimeQ[n_]:=Bigomega[n]==2; Primorial[n_]:=Product[Prime[i], {i, n}]; Select[Table[Primorial[n]-1, {n, 30}], SemiprimeQ] (* Ray Chandler, Mar 28 2005 *)

Formula

n# - 1 iff semiprime. Equals {A002110(i) - 1} intersection {A001358(j)}.

Extensions

Entry revised by N. J. A. Sloane, Apr 01 2006

A068489 m for which prime(m) is the least prime dividing #prime(n) - 1, i.e., one less than primorial n-th prime (A057588).

Original entry on oeis.org

3, 10, 5, 343, 3248, 18, 16, 12, 22, 20324, 50, 9414916809095, 13120, 43, 8481, 1200361259, 196, 38, 10326732314, 65, 38, 34
Offset: 2

Views

Author

Lekraj Beedassy, Mar 11 2002

Keywords

Comments

Since #P13 - 1 is a prime, see A006794, we need the number of primes less than or equal to #P13 - 1. The sequence continues, for n=14 to 23: 13120, 43, 8481, 1200361259, 196, 38, 10326732314, 65, 38, 34.
a(24) = pi(23768741896345550770650537601358309). - Donovan Johnson, Dec 08 2009

Crossrefs

Programs

  • Mathematica
    Do[ Print[ PrimePi[ FactorInteger[ Product[ Prime[k], {k, 1, n}] - 1] [[1, 1]]]], {n, 2, 22} ]

Formula

a(n) = A000720(A057713(n)).

Extensions

Edited and extended by Robert G. Wilson v, Mar 12 2002
a(13) from Donovan Johnson, Dec 08 2009

A103513 Primes of the form primorial(P(k))/2-2^n with minimal n, n>=0, k>=2.

Original entry on oeis.org

2, 13, 103, 1153, 15013, 255253, 4849843, 111546433, 3234846607, 100280245063, 3710369067401, 152125131763603, 6541380632280583, 307444891294245701, 16294579238595022363, 961380175077106319471, 58644190679703485491571
Offset: 1

Views

Author

Lei Zhou, Feb 15 2005

Keywords

Comments

The Mathematica Program does not produce a(2). Conjecture: sequence is defined for all k>=2.

Examples

			P(2)/2=3, 3-2^0=2 is prime, so a(2)=2;
P(5)/2=1155, 1155-2^1=1153 is prime, so a(5)=1153;
		

Crossrefs

Programs

  • Mathematica
    nmax = 2^8192; npd = 1; n = 2; npd = npd*Prime[n]; While[npd < nmax, tt = 2; cp = npd - tt; While[(cp > 1) && (! (PrimeQ[cp])), tt = tt*2; cp = npd - tt]; If[cp < 2, Print["*"], Print[cp]]; n = n + 1; npd = npd*Prime[n]]

A104877 Semiprimes of the form primorial(k) + 1.

Original entry on oeis.org

30031, 9699691, 223092871, 13082761331670031, 117288381359406970983271, 7858321551080267055879091, 40729680599249024150621323471, 267064515689275851355624017992791
Offset: 1

Views

Author

Jonathan Vos Post, Mar 28 2005

Keywords

Examples

			6# + 1 = 2*3*5*7*11*13 + 1 = 30031 = 59 x 509.
8# + 1 = 2*3*5*7*11*13*17*19 + 1 = 9699691 = 347 x 27953.
9# + 1 = 2*3*5*7*11*13*17*19*23 + 1 = 223092871 = 317 x 703763.
14# + 1 = 2*3*5*7*11*13*17*19*23*29*31*37*41*43 + 1 = 13082761331670031 = 167 x 78339888213593.
		

Crossrefs

Programs

  • Mathematica
    Bigomega[n_]:=Plus@@Last/@FactorInteger[n]; SemiprimeQ[n_]:=Bigomega[n]==2; Primorial[n_]:=Product[Prime[i], {i, n}]; Select[Table[Primorial[n]+1, {n, 30}], SemiprimeQ] (* Ray Chandler, Mar 28 2005 *)
    Select[FoldList[Times,Prime[Range[30]]]+1,PrimeOmega[#]==2&] (* Harvey P. Dale, Oct 13 2022 *)

Formula

n# + 1 iff semiprime. Equals {A002110(i) + 1} intersection {A001358(j)}.
Previous Showing 11-20 of 24 results. Next