login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A343440
a(n) = Sum_{d|n, gcd(d, n/d) = 1} (-1)^omega(n/d) * 2^(d-1).
0
1, 1, 3, 7, 15, 27, 63, 127, 255, 495, 1023, 2037, 4095, 8127, 16365, 32767, 65535, 130815, 262143, 524265, 1048509, 2096127, 4194303, 8388477, 16777215, 33550335, 67108863, 134217657, 268435455, 536854005, 1073741823, 2147483647, 4294966269, 8589869055, 17179869105
OFFSET
1,3
FORMULA
a(n) = 2^(n-1) - Sum_{d|n, gcd(d, n/d) = 1, d < n} a(d).
MATHEMATICA
a[n_] := Sum[If[GCD[d, n/d] == 1, (-1)^PrimeNu[n/d] 2^(d - 1), 0], {d, Divisors[n]}]; Table[a[n], {n, 35}]
PROG
(PARI) a(n) = sumdiv(n, d, if (gcd(d, n/d)==1, (-1)^omega(n/d) * 2^(d-1))); \\ Michel Marcus, Apr 15 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 15 2021
STATUS
approved