OFFSET
0,2
COMMENTS
This is sort of a bitmap representation of the divisors of odd numbers.
LINKS
Robert Israel, Table of n, a(n) for n = 0..3318
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
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
KEYWORD
nonn
AUTHOR
Don Knuth, Dec 22 2020
STATUS
approved