login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A349212 a(n) = Sum_{d|n} n^(d mod 2). 2
1, 3, 6, 6, 10, 14, 14, 11, 27, 22, 22, 28, 26, 30, 60, 20, 34, 57, 38, 44, 84, 46, 46, 54, 75, 54, 108, 60, 58, 124, 62, 37, 132, 70, 140, 114, 74, 78, 156, 86, 82, 172, 86, 92, 270, 94, 94, 104, 147, 153, 204, 108, 106, 220, 220, 118, 228, 118, 118, 248, 122, 126, 378, 70, 260 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
For each divisor d of n, add n if d is odd, otherwise add 1. For example, 6 has 4 divisors 1,2,3,6 which gives a(6) = 6 + 1 + 6 + 1 = 14.
LINKS
FORMULA
a(n) = A000005(A001787(n)) = A001227(n) * (n+A007814(n)). [The first formula found by LODA miner] - Antti Karttunen, Apr 20 2022
MATHEMATICA
a[n_] := DivisorSum[n, n^Mod[#, 2] &]; Array[a, 100] (* Wesley Ivan Hurt, Nov 12 2022 *)
PROG
(PARI) A349212(n) = sumdiv(n, d, n^(d%2)); \\ Antti Karttunen, Nov 10 2021
(Python)
from sympy import divisors
def a(n): return sum(n**(d%2) for d in divisors(n))
print([a(n) for n in range(1, 66)]) # Michael S. Branicky, Apr 20 2022
(Python)
from sympy import divisor_count
def A349212(n): return (n+(m:=(~n&n-1).bit_length()))*divisor_count(n>>m) # Chai Wah Wu, Jul 16 2022
CROSSREFS
Sequence in context: A276000 A333616 A316563 * A316140 A147849 A332546
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Nov 10 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 12:25 EDT 2024. Contains 371844 sequences. (Running on oeis4.)