OFFSET
1,2
COMMENTS
Inverse Moebius transform of Jacobsthal numbers (A001045).
FORMULA
G.f.: Sum_{k>=1} A001045(k) * x^k/(1 - x^k).
a(n) = (1/3) * Sum_{d|n} (2^d - (-1)^d).
MAPLE
seq(add(2^d-(-1)^d, d=numtheory:-divisors(n))/3, n=1..50); # Robert Israel, Aug 14 2019
MATHEMATICA
nmax = 36; CoefficientList[Series[Sum[x^k/(1 - x^k - 2 x^(2 k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
Table[(1/3) Sum[(2^d - (-1)^d), {d, Divisors[n]}], {n, 1, 36}]
PROG
(PARI) a(n)={sumdiv(n, d, 2^d - (-1)^d)/3} \\ Andrew Howroyd, Aug 14 2019
(Python)
n = 1
while n <= 36:
s, d = 0, 1
while d <= n:
if n%d == 0:
s = s+2**d-(-1)**d
d = d+1
print(n, s//3)
n = n+1 # A.H.M. Smeets, Aug 14 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Aug 14 2019
STATUS
approved