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.

A355931 Greatest common divisor of the odd part of n and sigma(n), where sigma is the sum of divisors function.

This page as a plain text file.
%I A355931 #11 Jul 22 2022 16:44:49
%S A355931 1,1,1,1,1,3,1,1,1,1,1,1,1,1,3,1,1,3,1,1,1,1,1,3,1,1,1,7,1,3,1,1,3,1,
%T A355931 1,1,1,1,1,5,1,3,1,1,3,1,1,1,1,1,3,1,1,3,1,1,1,1,1,3,1,1,1,1,1,3,1,1,
%U A355931 3,1,1,3,1,1,1,1,1,3,1,1,1,1,1,7,1,1,3,1,1,9,7,1,1,1,5,3,1,1,3,1,1,3,1,1,3
%N A355931 Greatest common divisor of the odd part of n and sigma(n), where sigma is the sum of divisors function.
%H A355931 Antti Karttunen, <a href="/A355931/b355931.txt">Table of n, a(n) for n = 1..100000</a>
%H A355931 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>
%F A355931 a(n) = gcd(A000203(n), A000265(n)) = gcd(n, A161942(n)) = A000265(A009194(n)).
%t A355931 a[n_] := GCD[DivisorSigma[1, n], n/2^IntegerExponent[n, 2]]; Array[a, 100] (* _Amiram Eldar_, Jul 22 2022 *)
%o A355931 (PARI)
%o A355931 A000265(n) = (n>>valuation(n,2));
%o A355931 A355931(n) = gcd(A000265(n), sigma(n));
%o A355931 (Python)
%o A355931 from math import gcd
%o A355931 from sympy import divisor_sigma
%o A355931 def A355931(n): return gcd(divisor_sigma(n),n>>(~n&n-1).bit_length()) # _Chai Wah Wu_, Jul 22 2022
%Y A355931 Cf. A000203, A000265, A009194, A161942.
%Y A355931 Cf. also A355834.
%K A355931 nonn,easy
%O A355931 1,6
%A A355931 _Antti Karttunen_, Jul 22 2022