login
A373275
a(n) = Sum_{d|n} (-1)^(d-1) * 2^(n/d-1).
1
1, 1, 5, 5, 17, 29, 65, 117, 261, 497, 1025, 2017, 4097, 8129, 16405, 32629, 65537, 130845, 262145, 523765, 1048645, 2096129, 4194305, 8386641, 16777233, 33550337, 67109125, 134209477, 268435457, 536855053, 1073741825, 2147450741, 4294968325, 8589869057
OFFSET
1,3
FORMULA
G.f.: 1/2 * Sum_{k>=1} (2*x)^k / (1 + x^k).
If p is an odd prime, a(p) = 1 + 2^(p-1).
PROG
(PARI) a(n) = sumdiv(n, d, (-1)^(d-1)*2^(n/d-1));
(PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, (2*x)^k/(1+x^k))/2)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, May 29 2024
STATUS
approved