%I #16 Sep 08 2022 08:45:07
%S 104006,272986,557480,706706,757316,835016,908600,948310,995554,
%T 1093730,1181410,1198406,1212694,1252510,1253330,1283710,1352560,
%U 1370915,1428686,1440880,1452836,1513730,1524446,1627444,1654730,1662310
%N 3-apexes of omega: numbers k such that omega(k-3) < omega(k-2) < omega(k-1) < omega(k) > omega(k+1) > omega(k+2) > omega(k+3), where omega(m) = the number of distinct prime factors of m.
%C I call n a "k-apex" (or "apex of height k") of the arithmetical function f if n satisfies f(n-k) < ... < f(n-1) < f(n) > f(n+1) > .... > f(n+k).
%H Amiram Eldar, <a href="/A076761/b076761.txt">Table of n, a(n) for n = 1..10000</a>
%e omega(104003), ..., omega(104006), ..., omega(104009) equal 1, 3, 4, 5, 3, 2, 1, respectively. Hence 104006 is a term of the sequence.
%t omega[n_] := Length[FactorInteger[n]]; Select[Range[5, 10^6], omega[ # - 3] < omega[ # - 2] < omega[ # - 1] < omega[ # ] > omega[ # + 1] > omega[ # + 2] > omega[ # + 3] &]
%t okQ[{a_,b_,c_,d_,e_,f_,g_}]:=a<b<c<d>e>f>g; Flatten[ Position[ Partition[ PrimeNu[ Range[167*10^4]],7,1],_?(okQ[#]&)]]+3 (* _Harvey P. Dale_, Jul 27 2019 *)
%o (Magma) pd:=PrimeDivisors; f:=func<n|#pd(n-3) lt #pd(n-2) and #pd(n-2) lt #pd(n-1) and #pd(n-1) lt #pd(n)>; f1:=func<n|#pd(n) gt #pd(n+1) and #pd(n+1) gt #pd(n+2) and #pd(n+2) gt #pd(n+3)>; [k:k in [4..170000]|f(k) and f1(k)]; // _Marius A. Burtea_, Feb 18 2020
%Y Cf. A001222.
%K nonn
%O 1,1
%A _Joseph L. Pe_, Nov 13 2002
%E a(10)-a(26) from _Donovan Johnson_, Feb 07 2009