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 A160020 #7 Feb 02 2020 22:23:11 %S A160020 1,4,4,16,10,18,22,64,46,46,58,76,88,94,106,256,214,198,226,196,288, %T A160020 246,274,312,436,370,406,388,484,438,466,1024,934,886,946,820,1072, %U A160020 934,994,808,1348,1186,1254,1012,1396,1126,1186,1264,1996,1786,1870,1516,2044 %N A160020 Row sums of triangle in A160019 . %H A160020 Andrew Howroyd, <a href="/A160020/b160020.txt">Table of n, a(n) for n = 0..1000</a> %F A160020 a(n) = b^2 + (n+1-b)*(n-b), where b = 2^A000120(n). - _Andrew Howroyd_, Feb 02 2020 %e A160020 Triangle A160019 begins : 1 ; 1,3 ; 1,0,3 ; 1,3,5,7 ; 1,0,2,4,3 ; 1,3,0,2,5,7 ; ... %o A160020 (PARI) \\ here S(n,k) is A047999.S(n,k)={bitand(n-k, k)==0}a(n)={my(b=0); sum(k=0, n, if(S(n,k), b++; 2*b-1, 2*(k-b)))} \\ _Andrew Howroyd_, Feb 02 2020 %o A160020 (PARI) a(n)={my(b=2^hammingweight(n)); b^2 + (n+1-b)*(n-b)} \\ _Andrew Howroyd_, Feb 02 2020 %Y A160020 Cf. A000120, A001316, A007318, A047999, A160019. %K A160020 easy,nonn %O A160020 0,2 %A A160020 _Philippe Deléham_, Apr 29 2009 %E A160020 Terms a(11) and beyond from _Andrew Howroyd_, Feb 02 2020