login
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.
6
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,1
COMMENTS
This sequence is different from A070826 and A118750.
EXAMPLE
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.
MATHEMATICA
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 *)
PROG
(UBASIC)
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
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Enoch Haga, Dec 25 2007
EXTENSIONS
Edited, corrected and extended by Farideh Firoozbakht, Aug 13 2009
STATUS
approved