cp's OEIS Frontend

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.

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

This page as a plain text file.
%I A182936 #25 Jan 31 2025 06:22:19
%S A182936 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 A182936 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 A182936 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 A182936 Greatest common divisor of the proper divisors of n, 0 if there are none.
%C A182936 Here a proper divisor d of n is a divisor of n such that 1 < d < n.
%H A182936 Antti Karttunen, <a href="/A182936/b182936.txt">Table of n, a(n) for n = 1..10000</a>
%F A182936 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
%F A182936 Conjecture: Sum_{k=1..n} a(k) = A072107(n) - A034387(n) - 1. - _Vaclav Kotesovec_, Jan 29 2025
%F A182936 From _Peter Luschny_, Jan 31 2025: (Start)
%F A182936 a(n) = A014963(n) - A061397(n) for n > 1. In other words, this sequence is the exponential von Mangoldt function restricted to proper divisors of n. See A380118. This implies the above conjecture.
%F A182936 a(n) = A020500(n) - A061397(n). (End)
%p A182936 A182936 := n -> igcd(op(numtheory[divisors](n) minus {1,n}));
%p A182936 seq(A182936(i), i=1..79); # _Peter Luschny_, Mar 22 2011
%t A182936 Join[{0}, Table[GCD@@Most[Rest[Divisors[n]]],{n,2,110}]] (* _Harvey P. Dale_, May 04 2018 *)
%t A182936 (* From _Peter Luschny_, Jan 31 2025: (Start) *)
%t A182936 Join[{0}, Table[Exp[MangoldtLambda[n]] - If[PrimeQ[n], n, 0], {n,2,110}]]
%t A182936 (* or *)
%t A182936 Table[Cyclotomic[n, 1] - If[PrimeQ[n], n, 0], {n,1,110}] (* End *)
%o A182936 (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 A182936 Cf. A014963, A020500, A048671, A034387, A061397, A072107, A380118.
%K A182936 nonn
%O A182936 1,4
%A A182936 _Peter Luschny_, Mar 22 2011
%E A182936 More terms from _Antti Karttunen_, Sep 23 2017