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!)
A339916 The sum of 2^((d-1)/2) over all divisors of 2n+1. 4
1, 3, 5, 9, 19, 33, 65, 135, 257, 513, 1035, 2049, 4101, 8211, 16385, 32769, 65571, 131085, 262145, 524355, 1048577, 2097153, 4194455, 8388609, 16777225, 33554691, 67108865, 134217765, 268435971, 536870913, 1073741825, 2147484699, 4294967365, 8589934593, 17179871235, 34359738369, 68719476737 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
This is sort of a bitmap representation of the divisors of odd numbers.
LINKS
EXAMPLE
For n=7, a(7)=2^7+2^2+2^1+2^0=135 because the divisors of 15 are 15,5,3,1.
MAPLE
seq(add(2^((d-1)/2), d=numtheory:-divisors(2*n+1)), n=0..100); # Robert Israel, Dec 24 2020
MATHEMATICA
A339916[n_]:=Block[{d=Divisors[2n+1]}, Sum[2^((d[[k]]-1)/2), {k, Length[d]}]]; Array[A339916, 50, 0]
PROG
(PARI) a(n) = sumdiv(2*n+1, d, 2^((d-1)/2)); \\ Michel Marcus, Dec 23 2020
(Python)
from sympy import divisors
def a(n): return sum(2**((d-1)//2) for d in divisors(2*n+1))
print([a(n) for n in range(37)]) # Michael S. Branicky, Dec 24 2020
CROSSREFS
Cf. A114001 (bit reversal), A034729, A055895.
Sequence in context: A218138 A192230 A291222 * A071384 A291398 A078066
KEYWORD
nonn
AUTHOR
Don Knuth, Dec 22 2020
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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)