This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A078701 #25 Jul 04 2022 04:39:14 %S A078701 1,1,3,1,5,3,7,1,3,5,11,3,13,7,3,1,17,3,19,5,3,11,23,3,5,13,3,7,29,3, %T A078701 31,1,3,17,5,3,37,19,3,5,41,3,43,11,3,23,47,3,7,5,3,13,53,3,5,7,3,29, %U A078701 59,3,61,31,3,1,5,3,67,17,3,5,71,3,73,37,3,19,7,3,79,5,3,41,83,3,5,43,3,11 %N A078701 Least odd prime factor of n, or 1 if no such factor exists. %H A078701 Harvey P. Dale, <a href="/A078701/b078701.txt">Table of n, a(n) for n = 1..1000</a> %F A078701 a(n) = A020639(A000265(n)); %F A078701 a(n) = A020639(n) iff n is odd; a(2^k) = 1. %p A078701 A078701 := proc(n) %p A078701 fs := numtheory[factorset](n) minus {2}; %p A078701 if fs = {} then %p A078701 1; %p A078701 else %p A078701 min(op(fs)) ; %p A078701 end if; %p A078701 end proc: # _R. J. Mathar_, Feb 06 2019 %t A078701 lof[n_]:=Module[{fac=Select[Transpose[FactorInteger[n]][[1]],OddQ]}, If[fac=={},1,Min[fac]]]; Array[lof,90] (* _Harvey P. Dale_, Apr 14 2012 *) %t A078701 a[n_] := FactorInteger[n/2^IntegerExponent[n, 2]][[1, 1]]; Array[a, 100] (* _Amiram Eldar_, Jul 04 2022 *) %o A078701 (Haskell) %o A078701 a078701 n = if null odds then 1 else head odds %o A078701 where odds = tail $ a182469_row n %o A078701 -- _Reinhard Zumkeller_, Oct 08 2012 %o A078701 (PARI) a(n) = my(v = select(x->((x%2)==1), factor(n)[,1])); if (#v, vecmin(v), 1); \\ _Michel Marcus_, Oct 25 2017 %o A078701 (PARI) A078701(n)=iferr(factor(n)[2-bittest(n,0),1],E,1) \\ _M. F. Hasler_, Nov 06 2017 %o A078701 (Python) %o A078701 from sympy import factorint %o A078701 def A078701(n): return min((p for p in factorint(n) if p > 2), default=1) # _Chai Wah Wu_, Feb 03 2022 %Y A078701 Cf. A000265, A020639, A005408, A000079. %K A078701 nonn %O A078701 1,3 %A A078701 _Reinhard Zumkeller_, Dec 18 2002