login
A355931
Greatest common divisor of the odd part of n and sigma(n), where sigma is the sum of divisors function.
4
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,6
FORMULA
a(n) = gcd(A000203(n), A000265(n)) = gcd(n, A161942(n)) = A000265(A009194(n)).
MATHEMATICA
a[n_] := GCD[DivisorSigma[1, n], n/2^IntegerExponent[n, 2]]; Array[a, 100] (* Amiram Eldar, Jul 22 2022 *)
PROG
(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
CROSSREFS
Cf. also A355834.
Sequence in context: A082457 A356307 A356306 * A031178 A327401 A091407
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Jul 22 2022
STATUS
approved