A051342
Smallest prime factor of 1 + (product of first n primes).
Original entry on oeis.org
3, 7, 31, 211, 2311, 59, 19, 347, 317, 331, 200560490131, 181, 61, 167, 953, 73, 277, 223, 54730729297, 1063, 2521, 22093, 265739, 131, 2336993, 960703, 2297, 149, 334507, 5122427, 1543, 1951, 881, 678279959005528882498681487, 87549524399, 23269086799180847
Offset: 1
-
a:= proc(n)
local N, F, i;
N:= 1 + mul(ithprime(i),i=1..n);
F:= select(type,map(t->t[1],ifactors(N,easy)[2]),integer);
if nops(F) >= 1 then return min(F) fi;
min(map(t->t[1],ifactors(N)[2]))
end proc:
seq(a(n),n=1..40); # Robert Israel, Oct 19 2014
-
Map[FactorInteger,
Table[Product[Prime[n], {n, 1, m}] + 1, {m, 1, 36}]][[All,
1]][[All, 1]] (* Geoffrey Critzer, Oct 19 2014 *)
FactorInteger[#][[1,1]]&/@(FoldList[Times,Prime[Range[40]]]+1) (* Harvey P. Dale, Oct 08 2021 *)
-
a(n) = factor(1 + prod(i=1, n, prime(i)))[1, 1]; \\ Michel Marcus, Dec 10 2013
A096177
Primes p such that primorial(p)/2 + 2 is prime.
Original entry on oeis.org
2, 3, 5, 7, 13, 29, 31, 37, 47, 59, 109, 223, 307, 389, 457, 1117, 1151, 2273, 9137, 10753, 15727, 25219, 26459, 29251, 30259, 52901, 194471
Offset: 1
a(3)=7 because primorial(7)/2 + 2 = A070826(4) + 2 = 2*3*5*7/2 + 2 = 107 is prime.
-
k = 1; Do[If[PrimeQ[n], k = k*n; If[PrimeQ[k/2 + 2], Print[n]]], {n, 2, 100000}] (* Ryan Propper, Jul 03 2005 *)
-
P=1/2;forprime(p=2,1e4,if(isprime((P*=p)+2), print1(p", "))) \\ Charles R Greathouse IV, Mar 14 2011
7 additional terms, corresponding to probable primes, from
Ryan Propper, Jul 03 2005
A128421
Numbers k such that p(k)# + p(k+1)# + 1 is prime, where p(k)# is the product of first k primes (A002110).
Original entry on oeis.org
2, 3, 4, 5, 6, 8, 20, 56, 101, 108, 141, 202, 265, 364, 401, 1035, 1588, 3062, 4191, 4579, 10373
Offset: 1
-
Module[{nn=450,prmrl},prmrl=Partition[FoldList[Times,Prime[Range[nn]]],2,1];Position[prmrl,?(PrimeQ[#[[1]]+#[[2]]+ 1]&),1,Heads-> False]]//Flatten (* The program generates the first 15 terms of the sequence. *) (* _Harvey P. Dale, Sep 26 2024 *)
-
pd(n)=prod(i=1,n,prime(i)) \\ A002110
for(k=1,10^4,a=pd(k)+pd(k+1)+1;if(isprime(a),print1(k,", "))) \\ Alexandru Petrescu,Jun 17 2022
A370129
Triangle read by rows: T(n,k) = A003415(A002110(n)+A002110(k)), 0 <= k <= n; arithmetic derivatives of the sums of two primorial numbers.
Original entry on oeis.org
1, 1, 4, 1, 12, 16, 1, 80, 60, 92, 1, 216, 540, 608, 704, 1, 3740, 3100, 4548, 6324, 8164, 568, 60080, 40060, 56292, 116208, 61768, 110752, 33975, 1021040, 1041768, 794468, 2415104, 1091004, 1357128, 1942844, 28300, 9789116, 29099520, 19722884, 18576860, 35347200, 35779644, 26575580, 37935056, 704080, 335024060
Offset: 0
Triangle begins as:
1;
1, 4;
1, 12, 16;
1, 80, 60, 92;
1, 216, 540, 608, 704;
1, 3740, 3100, 4548, 6324, 8164;
568, 60080, 40060, 56292, 116208, 61768, 110752;
33975, 1021040, 1041768, 794468, 2415104, 1091004, 1357128, 1942844;
28300, 9789116, 29099520, 19722884, 18576860, 35347200, 35779644, 26575580, 37935056;
Cf. also
A024451 (arithmetic derivatives of primorials).
A057706
Smaller of twin primes whose average is a primorial number.
Original entry on oeis.org
(5+7)/2 = 6 = 2*3, (29+31)/2 = 30 = 2*3*5, (2309+2311)/2 = 2310 = 2*3*5*7*11.
-
Select[FoldList[Times, Prime@ Range@ 40], AllTrue[# + {-1, 1}, PrimeQ] &] - 1 (* Michael De Vlieger, Jul 15 2017 *)
-
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
A096547
Primes p such that primorial(p)/2 - 2 is prime.
Original entry on oeis.org
5, 7, 11, 13, 17, 19, 23, 31, 41, 53, 71, 103, 167, 431, 563, 673, 727, 829, 1801, 2699, 4481, 6121, 7283, 9413, 10321, 12491, 17807, 30307, 31891, 71917, 172517
Offset: 1
Prime 7 is a term because primorial(7)/2 - 2 = A034386(7)/2 - 2 = 2*3*5*7/2 - 2 = 103 is prime.
-
b:= proc(n) b(n):= `if`(n=0, 1, `if`(isprime(n), n, 1)*b(n-1)) end:
q:= p-> isprime(p) and isprime(b(p)/2-2):
select(q, [$1..500])[];
-
k = 1; Do[k *= Prime[n]; If[PrimeQ[k - 2], Print[Prime[n]]], {n, 2, 3276}] (* Ryan Propper, Oct 25 2005 *)
Prime[#]&/@Flatten[Position[FoldList[Times,Prime[Range[1000]]]/2-2,?PrimeQ]] (* _Harvey P. Dale, Jun 09 2023 *)
A136351
Primorial numbers p# such that p# + 1 is a prime.
Original entry on oeis.org
1, 2, 6, 30, 210, 2310, 200560490130
Offset: 1
a(6)=2310 is followed by prime 2311 whereas 30030 is not followed by a prime.
-
Select[FoldList[Times, 1, Prime[Range[18]]],PrimeQ[#+1]&] (* James C. McMahon, May 08 2025 *)
-
S=[];for(n=0, 80, k=vecprod(primes(n)); if(isprime(k+1), S=concat(S,k))); S \\ Miles Englezou, Oct 28 2024
Changed a(1) from 4 to 2 and edited by
R. J. Mathar, Jul 23 2008
A087398
Primes of the form primorial(P(k))/2-2.
Original entry on oeis.org
13, 103, 1153, 15013, 255253, 4849843, 111546433, 100280245063, 152125131763603, 16294579238595022363, 278970415063349480483707693, 11992411764462614086353260819346129198103, 481473710367991963528473107950567214598209565303106537707981745633
Offset: 1
Cf.
A096177 primes k such that primorial(k)/2+2 is prime,
A096178 primes of the form primorial(k)/2+2,
A096547 Primes k such that primorial(k)/2-2 is prime,
A067024 smallest p+2 that has n distinct prime factors,
A014545 primorial primes.
-
Select[#/2-2&/@Rest[FoldList[Times,1,Prime[Range[100]]]],PrimeQ] (* Harvey P. Dale, Mar 30 2013 *)
-
twimorial(n) = { s=0; p=3; forprime(x=5,n, if(isprime(x-2),c1++); p=p*x; if(isprime(p-2), print1(p-2","); c2++; s+=1.0/(p-2); ) ); print(); print(s) }
-
v=[];pr=1; forprime(p=3,2357,pr*=p; if(ispseudoprime(pr-2),v=concat(v,pr-2))) \\ Charles R Greathouse IV, Feb 14 2011
A096178
Primes of the form primorial(p)/2+2.
Original entry on oeis.org
3, 5, 17, 107, 15017, 3234846617, 100280245067, 3710369067407, 307444891294245707, 961380175077106319537, 139867498408927468089138080936033904837498617
Offset: 1
a(4) = 107 because 107 is a prime of the form primorial(7)/2 + 2 = A070826(4) + 2 = 2*3*5*7/2 + 2.
-
for(n=1,30,p=prod(k=1,n,prime(k))/2+2;if(ispseudoprime(p),print1(p,", "))) \\ Hugo Pfoertner, Dec 26 2019
A118370
Divisorial primes: Primes p such that p = 1 + Product_{d|n} d for some n (ordered by n).
Original entry on oeis.org
2, 3, 37, 101, 197, 331777, 677, 8503057, 9834497, 5477, 59969537, 8837, 17957, 21317, 562448657, 916636177, 42437, 3208542737, 3782742017, 5006411537, 7676563457, 98597, 106277, 11574317057, 19565295377, 416806419029812551937, 148997, 34188010001, 38167092497
Offset: 1
The prime 37 is a(3) as there exists a number, A118369(3)=6, such that 37 = 6*3*2*1 + 1, where {1,2,3,6} are all the positive divisors of 6.
-
Reap[For[n = 1, n <= 500, n++, p = Times @@ Divisors[n]; If[PrimeQ[p+1], Sow[p+1]]]][[2, 1]] (* Jean-François Alcover, Oct 07 2016 *)
-
for(n=1,2500, s=1; fordiv(n,d,s=s*d); if(isprime(s+1), print1(s+1,", ")))
Comments