A161942 Odd part of sum of divisors of n.
1, 3, 1, 7, 3, 3, 1, 15, 13, 9, 3, 7, 7, 3, 3, 31, 9, 39, 5, 21, 1, 9, 3, 15, 31, 21, 5, 7, 15, 9, 1, 63, 3, 27, 3, 91, 19, 15, 7, 45, 21, 3, 11, 21, 39, 9, 3, 31, 57, 93, 9, 49, 27, 15, 9, 15, 5, 45, 15, 21, 31, 3, 13, 127, 21, 9, 17, 63, 3, 9, 9, 195, 37, 57, 31, 35, 3, 21, 5, 93, 121, 63
Offset: 1
Links
Crossrefs
Programs
-
Mathematica
oddPart[n_] := n/2^IntegerExponent[n, 2]; a[n_] := oddPart[ DivisorSigma[1, n]]; Table[a[n], {n, 1, 82}] (* Jean-François Alcover, Sep 03 2012 *)
-
PARI
oddpart(n)=n/2^valuation(n,2); a(n)=oddpart(sigma(n));
-
Python
from sympy import divisor_sigma def A161942(n): return (m:=int(divisor_sigma(n)))>>(~m&m-1).bit_length() # Chai Wah Wu, Mar 17 2023
-
Scheme
(define (A161942 n) (A000265 (A000203 n))) ;; [For the implementations of A000203 and A000265, see under the respective entries]. - Antti Karttunen, Nov 18 2017
Formula
Multiplicative with a(p^e) = oddpart((p^{e+1}-1)/(p-1)), where oddpart(n) = A000265(n) is the largest odd divisor of n.
a(n) = A337194(n)-1. - Antti Karttunen, Nov 30 2024
Comments