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

A153077 Largest number m such that sigma(m) = A002110(n) where A002110(n) is the product of the first n primes.

Original entry on oeis.org

5, 29, 116, 2309, 30029, 272264, 6715161, 154448901, 3696967556, 126321788241, 5984466237725, 304250263527209, 7475863618097156, 495878856926202725, 17521052944725830450, 1749278213298193453469, 65483587607609351045025
Offset: 2

Views

Author

Donovan Johnson, Dec 19 2008

Keywords

Examples

			a(9) = 154448901. Sigma(154448901) = A002110(9) = 223092870 = 2*3*5*7*11*13*17*19*23.
		

Crossrefs

Formula

a(n) = A057637(A002110(n)). - Chandler
a(A057704(n)) = A002110(A057704(n)) - 1. - Ray Chandler

Extensions

Extended by Ray Chandler, Dec 28 2008
Terms a(22)-a(24) in b-file from Max Alekseyev, Jan 29 2012

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

A088411 A088257 indexed by A002110.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 11, 13, 24, 66, 68, 75, 167, 171, 172, 287, 310, 352, 384, 457, 564, 590, 616, 620, 643, 849, 1391, 1552, 1613, 1849, 2122, 2647, 2673, 4413, 13494, 31260, 33237, 67132, 85586, 234725
Offset: 1

Views

Author

Ray Chandler, Sep 29 2003

Keywords

Comments

Union of A057704 and A014545. - Jeppe Stig Nielsen, Aug 01 2019

Examples

			3 is in the sequence because primorial p_3# = 2 * 3 * 5 = 30 has two prime neighbors 29 and 31.
4 is in the sequence because primorial p_4# = 2 * 3 * 5 * 7 = 210 has one prime neighbor 211; 209 = 11 * 19.
7 is not in the sequence because the product of the smallest 7 primes has two composite neighbors.
		

Crossrefs

Programs

  • Maple
    A:= NULL:
    P:= 1: p:= 1;
    for n from 1 to 700 do
      p:= nextprime(p);
      P:= P*p;
      if isprime(P+1) or isprime(P-1) then A:= A, n fi
    od:
    A; # Robert Israel, Aug 03 2016
  • Mathematica
    Select[Range[0, 600], Total@ Boole@ PrimeQ@ {# - 1, # + 1} > 0 &@ Apply[Times, Prime@ Range@ #] &] (* Michael De Vlieger, Aug 03 2016 *)
  • PARI
    is(k)=pr=prod(j=1,k,prime(j));ispseudoprime(pr-1)||ispseudoprime(pr+1) \\ Jeppe Stig Nielsen, Aug 01 2019

Formula

a(n)=k such that A088257(n)=A002110(k).

Extensions

a(22)-a(27) from Michael De Vlieger, Aug 03 2016
a(28)-a(40) from Jeppe Stig Nielsen, Aug 01 2019
a(41) from Jeppe Stig Nielsen, Oct 19 2021

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)}.

A224082 Numbers k such that A112141(k) - 1 is prime.

Original entry on oeis.org

1, 2, 6, 7, 11, 17, 20, 21, 36, 69, 84, 168, 207, 248, 401, 431, 435, 1468, 4421, 8949
Offset: 1

Views

Author

Keywords

Comments

This is the semiprime analog of A057704.
a(21) > 10000. - Tyler Busby, Feb 12 2023

Examples

			4*6*9*10*14*15 - 1 = 453599 which is prime.
		

Crossrefs

Programs

  • Mathematica
    NextSemiPrime[n_, k_: 1] := Block[{c = 0, sgn = Sign[k]}, sp = n + sgn; While[c < Abs[k], While[ PrimeOmega[sp] != 2, If[sgn < 0, sp--, sp++]]; If[sgn < 0, sp--, sp++]; c++]; sp + If[sgn < 0, 1, -1]]; f[n_] := Times @@ NestList[NextSemiPrime, 2^2, n - 1]; k = 1; lst = {}; While[k < 3501, If[ PrimeQ[f[k] - 1], Print[k]; AppendTo[lst, k]]; k++]; lst
  • PARI
    s=3;t=1;for(n=1,1000,while(bigomega(s++)!=2,);t*=s;if(ispseudoprime(t-1),print1(n", "))) \\ Charles R Greathouse IV, Apr 03 2013

Extensions

a(19) from Charles R Greathouse IV, Apr 03 2013
a(20) from Tyler Busby, Feb 12 2023

A286424 Number of partitions of p_n# into parts (q, k) both coprime to p_n#, with q prime and k nonprime, where p_n# = A002110(n).

Original entry on oeis.org

0, 0, 1, 1, 4, 110, 1432, 23338, 397661, 8193828, 212858328, 5941706227
Offset: 0

Views

Author

Michael De Vlieger, May 08 2017

Keywords

Comments

Number of totative pairs (q, k) such that prime q + k nonprime = p_n# and both gcd(q, p_n#) = 1 and gcd(k, p_n#) = 1, with p_n < q <= pi(p_n#), where pi(p_n#) = A000849(n) - n = A048862(n).
Primes p_n < q <= pi(p_n#) are greater than the greatest prime factor of p_n# = p_n, and are thus coprime to p_n#. By the definition of primorial, we need not consider p >= p_n, as these p are divisors of p_n#, i.e., gcd(p, p_n#) = p. Since the totatives of m can be paired such that a + b = m, we need only determine if (p_n# - q) is not prime in order to count pairs (q, k).
a(n) < floor(A005867(n)/2).
a(n) <= A048862(n).
The totative pair (q,1) = (p_n# - 1, 1) is counted by a(n) for n in A057704, with (p_n# - 1) appearing in A057705.

Examples

			a(0) = 0 by definition. A002110(0) = 1; 1 is coprime to all numbers; the only possible totative pair is (1,1) and this does not include both a prime and a nonprime.
a(1) = 0 since, of the floor(A005867(1)/2) = 1 totative pair (1,1) of A002110(1) = 2, none include a both a prime and a nonprime.
a(2) = 1 since, the only totative pair (1,5) of A002110(1) = 6 includes both a prime and a nonprime.
a(3) = 1 since only (1,29) includes both a prime and a nonprime.
a(4) = 4 since (23,187), (41,169), (67,143), (89,121) include a both a prime and a nonprime.
		

Crossrefs

Programs

  • Mathematica
    Table[Function[P, Count[Prime@ Range[n + 1, PrimePi[P]], q_ /; ! PrimeQ[P - q]]]@ Product[Prime@ i, {i, n}], {n, 0, 9}] (* Michael De Vlieger, May 08 2017 *)

Formula

a(n) = (A000010(A002110(n)) - A048863(n)) - 2*A117929(A002110(n))
= (A005867(n) - A048863(n)) - 2*A117929(A002110(n))
= A048862(n) - 2*A117929(A002110(n)).

Extensions

a(11) from Giovanni Resta, May 09 2017

A291373 a(n) is the smallest number k such that A001065(k) = A002110(n), or 0 if no such k exists.

Original entry on oeis.org

2, 0, 6, 841, 0, 1722, 30018, 0, 0, 0, 4057230930, 0, 0, 92568222856376123089883329681
Offset: 0

Views

Author

Altug Alkan, Aug 23 2017

Keywords

Comments

For n in A057704, 0 < a(n) <= (A002110(n)-1)^2. - Max Alekseyev, Sep 01 2025

Examples

			a(5) = 1722 because sigma(1722) - 1722 = 2*3*5*7*11 = A002110(5) and 1722 is the least number with this property.
		

Crossrefs

Formula

a(n) = A070015(A002110(n)). - Michel Marcus, Aug 25 2017

Extensions

a(7) and a(10) from Giovanni Resta, Aug 23 2017
a(8)-a(9), a(11)-a(13) from Max Alekseyev, Sep 04 2025

A333058 0, 1, or 2 primes at primorial(n) +- 1.

Original entry on oeis.org

1, 1, 2, 2, 1, 2, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Frank Ellermann, Mar 06 2020

Keywords

Comments

a(n) = 0 marks a prime gap size of at least 2*prime(n+1)-1, e.g., primorial(8) +- prime(9) = {9699667,9699713} are primes, gap 2*23-1.
Mathworld reports that it is not known if there are an infinite number of prime Euclid numbers.
The tables in Ondrejka's collection contain no further primorial twin primes after {2309,2311} = primorial(13) +- 1 up to primorial(15877) +- 1 with 6845 digits.

Examples

			a(2) = a(3) = a(5) = 2: 2*3 +-1 = {5,7}, 6*5 +-1 = {29,31} and 210*11 +-1 = {2309,2311} are twin primes.
a(1) = a(4) = a(6) = 1: 1, 30*7 - 1 = 209 and 2310*13 + 1 = 30031 are not primes.
a(7) = 0: 510509 = 61 * 8369 and 510511 = 19 * 26869 are not primes.
		

References

  • H. Dubner, A new primorial prime, J. Rec. Math., 21 (No. 4, 1989), 276.

Crossrefs

Cf. A096831, A002110 (primorials, p#), A057706.
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).
Cf. A010051, A088411 (where a(n) is positive), A088257.

Programs

  • Maple
    p:= proc(n) option remember; `if`(n<1, 1, ithprime(n)*p(n-1)) end:
    a:= n-> add(`if`(isprime(p(n)+i), 1, 0), i=[-1, 1]):
    seq(a(n), n=0..120);  # Alois P. Heinz, Mar 18 2020
  • Mathematica
    primorial[n_] := primorial[n] = Times @@ Prime[Range[n]];
    a[n_] := Boole@PrimeQ[primorial[n] - 1] + Boole@PrimeQ[primorial[n] + 1];
    a /@ Range[0, 105] (* Jean-François Alcover, Nov 30 2020 *)
  • Rexx
    S = ''                     ;  Q = 1
    do N = 1 to 27
       Q = Q * PRIME( N )
       T = ISPRIME( Q - 1 ) + ISPRIME( Q + 1 )
       S = S || ',' T
    end N
    S = substr( S, 3 )
    say S                      ;  return S

Formula

a(n) = [ isprime(primorial(n) - 1) ] + [ isprime(primorial(n) + 1) ].
a(n) = Sum_{i in {-1,1}} A010051(primorial(n) + i).
Previous Showing 11-20 of 21 results. Next