login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A182936 Greatest common divisor of the proper divisors of n, 0 if there are none. 4

%I #17 May 04 2018 17:11:20

%S 0,0,0,2,0,1,0,2,3,1,0,1,0,1,1,2,0,1,0,1,1,1,0,1,5,1,3,1,0,1,0,2,1,1,

%T 1,1,0,1,1,1,0,1,0,1,1,1,0,1,7,1,1,1,0,1,1,1,1,1,0,1,0,1,1,2,1,1,0,1,

%U 1,1,0,1,0,1,1,1,1,1,0,1,3,1,0,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,0,1,1

%N Greatest common divisor of the proper divisors of n, 0 if there are none.

%C Here a proper divisor d of n is a divisor of n such that 1 < d < n.

%H Antti Karttunen, <a href="/A182936/b182936.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = 0 if n is not composite, p if n is a proper power of prime p, and 1 otherwise. - _Franklin T. Adams-Watters_, Mar 22 2011

%p A182936 := n -> igcd(op(numtheory[divisors](n) minus {1,n}));

%p seq(A182936(i), i=1..79); # _Peter Luschny_, Mar 22 2011

%t Join[{0},Table[GCD@@Most[Rest[Divisors[n]]],{n,2,110}]] (* _Harvey P. Dale_, May 04 2018 *)

%o (PARI) A182936(n) = { my(divs=divisors(n)); if(#divs<3,0,gcd(vector(numdiv(n)-2,k,divs[k+1]))); }; \\ _Antti Karttunen_, Sep 23 2017

%Y Cf. A048671.

%K nonn

%O 1,4

%A _Peter Luschny_, Mar 22 2011

%E More terms from _Antti Karttunen_, Sep 23 2017

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)