A355931 Greatest common divisor of the odd part of n and sigma(n), where sigma is the sum of divisors function.
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, 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, 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
Offset: 1
Links
Programs
-
Mathematica
a[n_] := GCD[DivisorSigma[1, n], n/2^IntegerExponent[n, 2]]; Array[a, 100] (* Amiram Eldar, Jul 22 2022 *)
-
PARI
A000265(n) = (n>>valuation(n,2)); A355931(n) = gcd(A000265(n), sigma(n));
-
Python
from math import gcd from sympy import divisor_sigma def A355931(n): return gcd(divisor_sigma(n),n>>(~n&n-1).bit_length()) # Chai Wah Wu, Jul 22 2022