This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A245392 #13 Aug 01 2019 03:49:34 %S A245392 2,4,8,16,32,56,128,224,480,856,2048,3200,8192,13656,29920,54752, %T A245392 131072,202104,524288,857952,1939168,3495256,8388608,12918016, %U A245392 33013248,55924056,124631008,222655840,536870912,809850488,2147483648,3579172320,7974270688,14316557656 %N A245392 Sum_{k, k|n} 2^(k-1) + Sum_{1<=k<=n, gcd(k,n)=1} 2^(k-1). %C A245392 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 %F A245392 a(n) = A034729(n) + A054432(n). %F A245392 If p is prime a(p) = 2^p. %p A245392 f:= proc(k,n) local g; g:= igcd(k,n); g = 1 or g = k end proc: %p A245392 A:= n -> 1 + add(2^(k-1),k=select(f,[$1..n],n)); %p A245392 seq(A(n),n=1..100); # _Robert Israel_, Jul 21 2014 %o A245392 (PARI) sum(k=1, n, if (gcd(k,n)==1, 2^(k-1), 0)) + sumdiv(n, k, k*2^(k-1)); %Y A245392 Cf. A034729, A054432. %K A245392 nonn %O A245392 1,1 %A A245392 _Michel Marcus_, Jul 21 2014