A093549 a(n) is the smallest number m such that each of the numbers m-1, m and m+1 has n distinct prime divisors.
3, 21, 645, 37961, 1042405, 323567035, 30989984675, 10042712381261
Offset: 1
Examples
a(3)=645 because 644=2^2*7*23; 645=3*5*43; 646=2*17*19 and 645 is the smallest number m such that each of the numbers m-1, m and m+1 has 3 distinct prime divisors.
Programs
-
Mathematica
a[n_] := (For[m=2, !(Length[FactorInteger[m-1]]==n && Length[FactorInteger[m]]==n&&Length[FactorInteger[m+1]]==n), m++ ];m);Do[Print[a[n]], {n, 7}]
-
PARI
a(n,m=2)=until(,for(k=-1,1,omega(m-k)!=n&&(m+=2-k)&&next(2));return(m)) \\ M. F. Hasler, May 20 2014
Formula
a[n_] := (For[m=2, !(Length[FactorInteger[m-1]]==n && Length[FactorInteger[m]]==n&&Length[FactorInteger[m+1]]==n), m++ ];m)
Extensions
a(7) from Donovan Johnson, Apr 07 2008
a(8) from Donovan Johnson, Jan 15 2009
Comments