%I #16 Aug 16 2024 10:10:23
%S 2,2,2,3,2,2,2,3,3,3,3,5,2,2,2,3,3,5,5,7,3,3,3,3,3,3,5,5,2,2,2,7,3,3,
%T 3,13,5,5,5,7,7,5,5,5,3,3,3,5,5,13,3,3,3,7,7,19,5,5,5,7,2,2,2,11,11,
%U 17,7,7,3,3,3,5,5,5,11,11,5,3,3,3,7,7,7,17,11,11,5,5,5,13,23,19,3,3,3,7,5,5
%N Minimum of the largest prime factors of a number and its two neighbors.
%F a(n) = min{lpf(n-1),lpf(n),lpf(n+1)}, where lpf is the largest prime factor: lpf(k) = A006530(k).
%e a(93) = min{lpf(92),lpf(93),lpf(94)} = min{23,31,47} = 23.
%t LPF = FactorInteger[ # ][[ -1, 1]] &; Map[Min[{LPF[ # - 1], LPF[ # ], LPF[ # + 1]}] &, Range[3, 200]]
%t Min/@Partition[Table[FactorInteger[n][[-1,1]],{n,110}],3,1] (* _Harvey P. Dale_, May 25 2015 *)
%o (PARI) a(n) = my(lpf(k)=vecmax(factor(k)[, 1])); vecmin([lpf(n-1), lpf(n), lpf(n+1)]); \\ _Ruud H.G. van Tol_, Aug 15 2024
%Y Cf. A006530, A093074.
%K nonn,changed
%O 3,1
%A _Carlos Alves_, Nov 27 2006
|