OFFSET
1,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MAPLE
A078701 := proc(n)
fs := numtheory[factorset](n) minus {2};
if fs = {} then
1;
else
min(op(fs)) ;
end if;
end proc: # R. J. Mathar, Feb 06 2019
MATHEMATICA
lof[n_]:=Module[{fac=Select[Transpose[FactorInteger[n]][[1]], OddQ]}, If[fac=={}, 1, Min[fac]]]; Array[lof, 90] (* Harvey P. Dale, Apr 14 2012 *)
a[n_] := FactorInteger[n/2^IntegerExponent[n, 2]][[1, 1]]; Array[a, 100] (* Amiram Eldar, Jul 04 2022 *)
PROG
(Haskell)
a078701 n = if null odds then 1 else head odds
where odds = tail $ a182469_row n
-- Reinhard Zumkeller, Oct 08 2012
(PARI) a(n) = my(v = select(x->((x%2)==1), factor(n)[, 1])); if (#v, vecmin(v), 1); \\ Michel Marcus, Oct 25 2017
(PARI) A078701(n)=iferr(factor(n)[2-bittest(n, 0), 1], E, 1) \\ M. F. Hasler, Nov 06 2017
(Python)
from sympy import factorint
def A078701(n): return min((p for p in factorint(n) if p > 2), default=1) # Chai Wah Wu, Feb 03 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 18 2002
STATUS
approved