%I #25 Nov 12 2019 08:15:01
%S 46,5,43,1,2021,121,25202,2521,162121,460801,27268546,23553169,
%T 244068841,913535283,3195380866,2088087121,5988790769809,2601212829601
%N Least number to start a run of exactly n nondecreasing values of (big) Omega (A001222).
%C a(11) > 10^7. - _M. F. Hasler_, May 16 2017
%C a(19) > 7.5*10^12. - _Giovanni Resta_, Nov 12 2019
%D M. F. Hasler, Posting to Sequence Fans Mailing List, May 06 2017
%e Omega(1..5) = (0, 1, 1, 2, 1), therefore the first run of 4 numbers with nondecreasing Omega (= A001222) starts at a(4) = 1.
%e Omega(4..7) = (2, 1, 2, 1), so the first run of 2 numbers with nondecreasing Omega starts at a(2) = 5.
%e A run of subsequent numbers with nondecreasing Omega is of length 1 if it consists of a single number n with Omega(n-1) > Omega(n) > Omega(n+1) (else n belongs to a run of length >= 2). This happens first for a(1) = 46.
%t Prepend[#, Module[{k = 2}, While[Sign@ Differences@ PrimeOmega[k + {-1, 0, 1}] != {-1, -1}, k++]; k]] &@ Function[s, Function[r, If[Length@ # > 0, #[[1, 1]], -1] &@ Select[s, Length@ # == r &]] /@ Range@ Max@ Map[Length, s]]@ DeleteCases[SplitBy[MapIndexed[Function[k, (2 Boole[#1 <= #2] - 1) k & @@ #1]@ First@ #2 &, Partition[Array[PrimeOmega, 10^7], 2, 1]], Sign], w_ /; First@ w < 0] (* _Michael De Vlieger_, May 19 2017 *)
%o (PARI) From _M. F. Hasler_, May 16 2017: (Start)
%o alias('A, 'A286288);\\ A bug in PARI 2.9.2 requires the alias() to be issued on a line on itself.
%o A=vector(19); apply(scan(N, s=1, t=bigomega(s))=for(k=s+1, N, t>(t=bigomega(k))||next; k-s>#A||A[k-s]||printf(" a(%d)=%d, ", k-s, s)||A[k-s]=s; s=k); done, [1e7]) \\ Then the search may be extended using scan(END, START). - (End)
%Y Cf. A001222, A284597 (analog for sigma_0 = A000005), A285893 (analog for sigma = A000203), A286287 (analog for omega = A001221).
%Y See also A286289.
%K nonn,more,hard
%O 1,1
%A _N. J. A. Sloane_, May 16 2017
%E Edited by _M. F. Hasler_, May 16 2017
%E a(11)-a(13) from _Jon E. Schoenfield_, Jul 16 2017
%E a(14)-a(18) from _Giovanni Resta_, Nov 12 2019
|