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!)
A126773 a(n) = largest divisor of n which is coprime to the largest proper divisor of n. (a(1)=1.). 5
1, 2, 3, 1, 5, 2, 7, 1, 1, 2, 11, 1, 13, 2, 3, 1, 17, 2, 19, 1, 3, 2, 23, 1, 1, 2, 1, 1, 29, 2, 31, 1, 3, 2, 5, 1, 37, 2, 3, 1, 41, 2, 43, 1, 1, 2, 47, 1, 1, 2, 3, 1, 53, 2, 5, 1, 3, 2, 59, 1, 61, 2, 1, 1, 5, 2, 67, 1, 3, 2, 71, 1, 73, 2, 3, 1, 7, 2, 79, 1, 1, 2, 83, 1, 5, 2, 3, 1, 89, 2, 7, 1, 3, 2, 5, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Also the denominator of the ratio of the largest proper divisor to the least prime divisor of n, which can be thought of as the ratio of the 2nd largest divisor to the 2nd least divisor of n. - Michel Marcus, Feb 27 2017

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000

FORMULA

For n >= 2: Let p =A020639(n) be the smallest prime dividing n. If p^2 divides n, then a(n)=1. Otherwise, a(n) = p.

EXAMPLE

The largest proper divisor of 30 is A032742(30) = 15. So a(30)= 2, because 2 is the largest divisor of 30 which is coprime to 15.

MAPLE

A126773 := proc(n)

    local p ;

    p := A020639(n) ;

    if modp(n, p^2) = 0 then

        1 ;

    else

        p ;

    end if;

end proc:

seq(A126773(n), n=1..100) ; # R. J. Mathar, Mar 03 2017

MATHEMATICA

f[n_] := Block[{d = Divisors[n]}, If[n < 2, 1, Max @@ Select[d, GCD[ #, d[[ -2]]] == 1 &]]]; Array[f, 100] (* Ray Chandler, Feb 26 2007 *)

PROG

(PARI) a(n) = if (n==1, 1, my(d = divisors(n)); k = #d; while (gcd(d[k], d[#d-1]) != 1, k--); d[k]); \\ Michel Marcus, Feb 27 2017

(PARI) a(n) = if (n==1, 1, my(d = divisors(n)); denominator(d[#d-1]/d[2])); \\ Michel Marcus, Feb 27 2017

(PARI) a(n)=if(n==1, return(1)); my(f=factor(n)[1, ]); if(f[2]>1, 1, f[1]) \\ Charles R Greathouse IV, Feb 27 2017

CROSSREFS

Sequence in context: A055023 A323071 A340078 * A326691 A277698 A134194

Adjacent sequences:  A126770 A126771 A126772 * A126774 A126775 A126776

KEYWORD

nonn

AUTHOR

Leroy Quet, Feb 17 2007

EXTENSIONS

Extended by Ray Chandler, Feb 26 2007

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 September 17 03:42 EDT 2021. Contains 347478 sequences. (Running on oeis4.)