# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a136358 Showing 1-1 of 1 %I A136358 #14 Mar 17 2014 13:34:32 %S A136358 4,6,9,15,30,105,420,2310,3465,15015,180180,765765,4084080,106696590, %T A136358 247342095,892371480,3011753745,9704539845,100280245065,103515091680, %U A136358 4412330782860,29682952539240,634473110526255,22514519501013540 %N 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. %C A136358 This sequence is different from A070826 and A118750. %e A136358 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. %t A136358 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 *) %o A136358 (UBASIC) %o A136358 10 'A136358, _Enoch Haga_, Jun 19 2009' %o A136358 11 'compute and combine input 2 or 3 separately; begin with 4 and 9 %o A136358 20 input "prime, 2 or 3";A %o A136358 30 if A=2 or A=3 then B=nxtprm(A) %o A136358 40 print A;B;:R=A*B:print R;:stop %o A136358 50 if even(R)=1 then if R-1=prmdiv(R-1) and R+1=prmdiv(R+1) then print "*" %o A136358 60 if even(R)=0 then if R-2=prmdiv(R-2) and R+2=prmdiv(R+2) then print "+" %o A136358 61 print R:stop %o A136358 70 B=nxtprm(B):R=B*R %o A136358 90 print B;R:stop %o A136358 100 goto 50 %o A136358 - _Enoch Haga_, Jul 11 2009 %Y A136358 Cf. A136349-A136357, A070826, A118750. %K A136358 easy,nonn %O A136358 1,1 %A A136358 _Enoch Haga_, Dec 25 2007 %E A136358 Edited, corrected and extended by _Farideh Firoozbakht_, Aug 13 2009 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE