login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A078701 Least odd prime factor of n, or 1 if no such factor exists. 19
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

a(n) = A020639(A000265(n));

a(n) = A020639(n) iff n is odd; a(2^k) = 1.

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 *)

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

CROSSREFS

Cf. A000265, A020639, A005408, A000079.

Sequence in context: A082725 A308655 A217663 * A299766 A161398 A204455

Adjacent sequences:  A078698 A078699 A078700 * A078702 A078703 A078704

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Dec 18 2002

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 4 14:51 EDT 2020. Contains 335448 sequences. (Running on oeis4.)