Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #38 Dec 19 2024 06:15:41
%S 1,0,2,3,0,5,4,7,0,0,0,1,9,13,8,0,0,1,0,19,0,0,0,1,0,0,0,12,0,29,1,1,
%T 0,0,0,22,0,37,18,27,0,1,0,43,0,0,0,1,0,0,0,0,0,1,0,1,49,0,0,1,0,61,
%U 32,0,0,0,0,67,0,0,0,1,0,73,0,0,0,45,0,1,0,0
%N a(n) is the GCD of the solutions x of sigma(x) = n; sigma(n) = A000203(n) = sum of divisors of n.
%C From n = 1 to 5, the least integers such that a(x) = n, depending on if singletons (see A007370 and A211656) are accepted or not, are 1, 3, 4, 7, 6 or 12, 126, 124, 210, 22152.
%C Is it possible to find an integer n such that a(n) = 6? Answer: n = A241625(6) = 6187272.
%H Antti Karttunen, <a href="/A240667/b240667.txt">Table of n, a(n) for n = 1..10000</a>
%H Max Alekseyev, <a href="https://oeis.org/wiki/User:Max_Alekseyev/gpscripts">PARI/GP Scripts for Miscellaneous Math Problems</a> (invphi.gp).
%F a(A007369(n)) = 0.
%e There are no integers such that sigma(x) = 2, so a(2) = 0.
%e There is a single integer, x = 2, such that sigma(x) = 3, so a(3) = 2.
%e There are 2 integers, x = 6 and 11, such that sigma(x)=12, their gcd is 1, so a(12) = 1.
%p A240667 := n -> igcd(op(select(k->sigma(k)=n, [$1..n]))):
%p seq(A240667(n), n=1..82); # _Peter Luschny_, Apr 13 2014
%t a[n_] := GCD @@ Select[Range[n], DivisorSigma[1, #] == n&];
%t Array[a, 100] (* _Jean-François Alcover_, Jul 30 2018 *)
%o (PARI) sigv(n) = select(i->sigma(i) == n, vector(n, i, i));
%o a(n) = {v = sigv(n); if (#v == 0, 0, gcd(v));}
%o (PARI) a(n) = my(s = invsigma(n)); if(#s, gcd(s), 0); \\ _Amiram Eldar_, Dec 19 2024, using _Max Alekseyev_'s invphi.gp
%Y Cf. A000203, A007369, A007370, A211656, A241479 (a variant), A241625.
%K nonn
%O 1,3
%A _Michel Marcus_, Apr 10 2014