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!)
A245392 Sum_{k, k|n} 2^(k-1) + Sum_{1<=k<=n, gcd(k,n)=1} 2^(k-1). 0
2, 4, 8, 16, 32, 56, 128, 224, 480, 856, 2048, 3200, 8192, 13656, 29920, 54752, 131072, 202104, 524288, 857952, 1939168, 3495256, 8388608, 12918016, 33013248, 55924056, 124631008, 222655840, 536870912, 809850488, 2147483648, 3579172320, 7974270688, 14316557656 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The 1's in the binary expansion of 2^n - a(n) correspond to k such that 1 < gcd(k,n) < k < n. - Robert Israel, Jul 21 2014
LINKS
FORMULA
a(n) = A034729(n) + A054432(n).
If p is prime a(p) = 2^p.
MAPLE
f:= proc(k, n) local g; g:= igcd(k, n); g = 1 or g = k end proc:
A:= n -> 1 + add(2^(k-1), k=select(f, [$1..n], n));
seq(A(n), n=1..100); # Robert Israel, Jul 21 2014
PROG
(PARI) sum(k=1, n, if (gcd(k, n)==1, 2^(k-1), 0)) + sumdiv(n, k, k*2^(k-1));
CROSSREFS
Sequence in context: A229614 A230216 A326081 * A115909 A254940 A196724
KEYWORD
nonn
AUTHOR
Michel Marcus, Jul 21 2014
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 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)