login
The smallest k such that k! + 1 has exactly n prime factors (with multiplicity).
1

%I #17 Nov 02 2022 07:50:10

%S 1,4,9,23,16,18,40,89

%N The smallest k such that k! + 1 has exactly n prime factors (with multiplicity).

%t With[{f=PrimeOmega[Range[90]!+1]},Table[Position[f,_?(#==n&),1,1],{n,8}]]//Flatten (* _Harvey P. Dale_, Feb 11 2018 *)

%o (PARI) a(n)=my(k);while(bigomega(k++!+1)-n,);k \\ _Charles R Greathouse IV_, Apr 25 2012

%Y Cf. A054990.

%K nonn,more

%O 1,2

%A _Robert G. Wilson v_, Mar 23 2001

%E a(8) from _Arkadiusz Wesolowski_, Apr 25 2012

%E Title clarified by _Sean A. Irvine_, Nov 02 2022