A136358
Increasing sequence obtained by union of two sequences {b(n)} and {c(n)}, where b(n) is the smallest odd composite number m such that both m-2 and m+2 are prime and the set of distinct prime factors of m consists of the first n odd primes and c(n) is the smallest composite number m such that both m-1 and m+1 are primes and the set of the distinct prime factors of m consists of the first n primes.
Original entry on oeis.org
4, 6, 9, 15, 30, 105, 420, 2310, 3465, 15015, 180180, 765765, 4084080, 106696590, 247342095, 892371480, 3011753745, 9704539845, 100280245065, 103515091680, 4412330782860, 29682952539240, 634473110526255, 22514519501013540
Offset: 1
a(1)=4 is preceded by 3 and followed by 5, both primes; a(3)=9, preceded by 7 and followed by 11, both primes.
-
b[n_]:=(d=Product[Prime[k],{k,n}]; For[m=1,!(!PrimeQ[d*m]&&PrimeQ[d*m-1] &&PrimeQ[d*m+1]&&Length[FactorInteger[c*m]]==n),m++ ]; d*m); c[n_]:=(d=Product [Prime[k],{k,2,n+1}]; For[m=1,!(!PrimeQ[d*(2*m-1)]&&PrimeQ[d(2m-1)-2]&&PrimeQ [d(2m-1)+2]&&Length[FactorInteger[d(2m-1)]]==n),m++ ]; d(2m-1)); Take[Union[Table [b[k],{k,24}],Table[c[k],{k,24}]],24] (* Farideh Firoozbakht, Aug 13 2009 *)
-
10 'A136358, Enoch Haga, Jun 19 2009'
11 'compute and combine input 2 or 3 separately; begin with 4 and 9
20 input "prime, 2 or 3";A
30 if A=2 or A=3 then B=nxtprm(A)
40 print A;B;:R=A*B:print R;:stop
50 if even(R)=1 then if R-1=prmdiv(R-1) and R+1=prmdiv(R+1) then print "*"
60 if even(R)=0 then if R-2=prmdiv(R-2) and R+2=prmdiv(R+2) then print "+"
61 print R:stop
70 B=nxtprm(B):R=B*R
90 print B;R:stop
100 goto 50
- Enoch Haga, Jul 11 2009
A088256
Primorial numbers k such that both k-1 and k+1 are prime.
Original entry on oeis.org
210 = primorial(4) is not a member as 209 is composite.
-
f:= proc(n)
local P;
P:= mul(seq(ithprime(i),i=1..n));
if isprime(P+1) and isprime(P-1) then P else NULL fi
end proc:
map(f, [$1..300]); # Robert Israel, Aug 31 2016
-
Select[Times @@ # & /@ Prime@ Range@ Range@ 700, Times @@ Boole@ PrimeQ@ {# - 1, # + 1} == 1 &] (* Michael De Vlieger, Aug 31 2016 *)
Select[FoldList[Times,Prime[Range[20]]],AllTrue[#+{1,-1},PrimeQ]&] (* Harvey P. Dale, Mar 31 2023 *)
-
lista(nn) = for (n=1, nn, pr = prod(i=1, n, prime(i)); if (isprime(pr-1) && isprime(pr+1), print1(pr, ", "))); \\ Michel Marcus, Aug 31 2016
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
A136352
Primorials P for which neither P-1 nor P+1 is prime.
Original entry on oeis.org
510510, 9699690, 223092870, 6469693230, 7420738134810, 13082761331670030, 614889782588491410, 32589158477190044730, 1922760350154212639070, 117288381359406970983270, 7858321551080267055879090
Offset: 1
13# = 30030 is preceded by a prime but is not followed by a prime. 17# = 510510 is neither preceded nor followed by a prime.
-
Select[FoldList[Times, 1, Prime[Range[19]]],!PrimeQ[#+1]&&!PrimeQ[#-1]&] (* James C. McMahon, May 08 2025 *)
A136350
Primorial numbers #p such that (#p)-1 is composite.
Original entry on oeis.org
210, 510510, 9699690, 223092870, 6469693230, 200560490130, 7420738134810, 13082761331670030, 614889782588491410, 32589158477190044730, 1922760350154212639070, 117288381359406970983270
Offset: 1
a(1)=210 because 209=A002110(4)-1 is not prime.
-
Select[FoldList[Times, 1, Prime[Range[18]]],CompositeQ[#-1]&] (* James C. McMahon, May 08 2025 *)
A136354
a(n) is the smallest odd composite number m such that m+2 is prime and the set of distinct prime factors of m consists of the first n odd primes.
Original entry on oeis.org
9, 15, 105, 3465, 15015, 765765, 33948915, 334639305, 3234846615, 100280245065, 3710369067405, 1369126185872445, 32706903329175075, 307444891294245705, 211829530101735290745, 961380175077106319535, 762374478836145311391255
Offset: 1
a(1)=9 because k=1 with prime factor 3 and 9+2=11, prime
-
a[n_]:=(c=Product[Prime[k],{k,2,n+1}]; For[m=1,!(!PrimeQ[c(2m-1)]&&PrimeQ[c(2m-1)+2]&&Length[FactorInteger[c(2m-1)]]==n),m++ ]; c(2m-1)); Table[a[n],{n,17}] (* Farideh Firoozbakht, Aug 12 2009 *)
A136355
Numbers of the form P = product of the first k odd primes where P+2 is composite.
Original entry on oeis.org
1155, 255255, 4849845, 111546435, 152125131763605, 6541380665835015, 16294579238595022365, 58644190679703485491635, 3929160775540133527939545, 278970415063349480483707695, 20364840299624512075310661735, 1608822383670336453949542277065
Offset: 1
a(1)=1155 because 1157 is not prime.
-
v=Select[Range[21],!PrimeQ[Product[Prime[k+1],{k,#}]+2]&]; Table[Product[Prime[k+1],{k,v[[t]]}],{t,Length[v]}] (* Farideh Firoozbakht, Aug 12 2009 *)
Select[FoldList[Times,Prime[Range[2,22]]],CompositeQ[#+2]&] (* Harvey P. Dale, Jun 08 2022 *)
A136353
First odd composite N divisible by precisely the first n odd primes with N-2 prime.
Original entry on oeis.org
9, 15, 105, 1155, 15015, 255255, 4849845, 111546435, 9704539845, 100280245065, 18551845337025, 152125131763605, 98120709987525225, 7071232499767651215, 16294579238595022365, 33648306127698721183725, 527797716117331369424715
Offset: 1
The first odd prime is 3, 3*3-2 = 7 is prime so a(1) = 9.
The product of the first two odd primes is 15, and 15-2 is prime, so a(2) = 15.
-
a[n_]:=(c=Product[Prime[k],{k,2,n+1}];For[m=1,!(!PrimeQ[c (2m-1)]&&PrimeQ[c(2m-1)-2]&&Length[FactorInteger[c(2m-1)]]==n),m++ ];c(2m-1));Table[a[n],{n,20}] (* Enoch Haga, Jul 02 2009 *)
-
sm(n,x)=forprime(p=2,x, n/=p^valuation(n,p)); n==1
a(n)=my(m=factorback(primes(n+1)[2..n+1]),k,p=prime(n+1)); while(!isprime(k++*m-2) && sm(k,p),); k*m \\ Charles R Greathouse IV, Sep 14 2015
A136356
Increasing sequence obtained by union of two sequences A136353 and {b(n)}, where b(n) is the smallest composite number m such that m-1 is prime and the set of distinct prime factors of m consists of the first n primes.
Original entry on oeis.org
4, 6, 9, 15, 30, 105, 420, 1155, 2310, 15015, 30030, 255255, 1021020, 4849845, 19399380, 111546435, 669278610, 9704539845, 38818159380, 100280245065, 601681470390, 14841476269620, 18551845337025, 152125131763605
Offset: 1
a(4)=15 because k=2 and prime factors are 3 and 5; 15 is odd and n-2=13, prime.
-
a[n_]:=(c=Product[Prime[k],{k,n}]; For[m=1,!(!PrimeQ[c*m]&&PrimeQ[c*m-1]&&Length[FactorInteger[c*m]]==n),m++ ]; c*m);
b[n_]:=(c=Product[Prime[k],{k,2,n+1}]; For[m=1,!(!PrimeQ[c(2m-1)]&&PrimeQ[c(2m-1)-2]&&Length[FactorInteger[c(2*m-1)]]==n),m++ ]; c(2m-1));
Take[Union[Table[a[k],{k,24}],Table[b[k],{k,24}]],24] (* Farideh Firoozbakht, Aug 13 2009 *)
A136357
Increasing sequence obtained by union of two sequences A136354 and {b(n)}, where b(n) is the smallest composite number m such that m+1 is prime and the set of distinct prime factors of m consists of the first n primes.
Original entry on oeis.org
4, 6, 9, 15, 30, 105, 210, 2310, 3465, 15015, 120120, 765765, 4084080, 33948915, 106696590, 334639305, 892371480, 3234846615, 71166625530, 100280245065, 200560490130, 3710369067405, 29682952539240, 1369126185872445
Offset: 1
a(4)=15 because k=2 with prime factors 3 and 5 and 15 is followed by 17, prime;
a(5)=30 because k=3 with prime factors 2, 3, 5 and 30 is followed by 31, prime.
-
a[n_]:=(c=Product[Prime[k],{k,n}]; For[m=1,!(!PrimeQ[c*m]&&PrimeQ[c*m+1]&& Length[FactorInteger[c*m]]==n),m++ ]; c*m);
b[n_]:=(c=Product[Prime[k],{k,2, n+1}]; For[m=1,!(!PrimeQ[c(2*m-1)]&&PrimeQ[c(2*m-1)+2]&&Length[FactorInteger [c(2*m-1)]]==n),m++ ]; c(2*m-1));
Take[Union[Table[a[k],{k,24}],Table[b[k],{k, 24}]],24] (* Farideh Firoozbakht, Aug 13 2009 *)
Showing 1-10 of 10 results.
Comments