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 A224924 #38 Nov 03 2022 08:20:01 %S A224924 0,1,3,12,16,33,63,112,120,153,211,300,408,553,735,960,976,1041,1155, %T A224924 1324,1536,1809,2143,2544,2952,3433,3987,4620,5320,6105,6975,7936, %U A224924 7968,8097,8323,8652,9072,9601,10239,10992,11800,12729,13779,14956,16248,17673,19231,20928 %N A224924 Sum_{i=0..n} Sum_{j=0..n} (i AND j), where AND is the binary logical AND operator. %C A224924 For n>0, a(2^n)-A000217(2^n)=a(2^n-1)-A000217(2^n-1) [See links]. - _R. J. Cano_, Aug 21 2013 %H A224924 Enrique Pérez Herrero, <a href="/A224924/b224924.txt">Table of n, a(n) for n = 0..1000</a> %H A224924 R. J. Cano, <a href="/w/images/6/68/PropertiesA224924andA2000217.pdf">Additional information</a> %H A224924 Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, <a href="https://arxiv.org/abs/2210.10968">Identities and periodic oscillations of divide-and-conquer recurrences splitting at half</a>, arXiv:2210.10968 [cs.DS], 2022, pp. 42-43. %F A224924 a(2^n) = a(2^n - 1) + 2^n. %F A224924 a(n) -a(n-1) = 2*A222423(n) -n. - _R. J. Mathar_, Aug 22 2013 %p A224924 read("transforms") : %p A224924 A224924 := proc(n) %p A224924 local a,i,j ; %p A224924 a := 0 ; %p A224924 for i from 0 to n do %p A224924 for j from 0 to n do %p A224924 a := a+ANDnos(i,j) ; %p A224924 end do: %p A224924 end do: %p A224924 a ; %p A224924 end proc: # _R. J. Mathar_, Aug 22 2013 %t A224924 a[n_] := Sum[BitAnd[i, j], {i, 0, n}, {j, 0, n}]; %t A224924 Table[a[n], {n, 0, 20}] %t A224924 (* _Enrique Pérez Herrero_, May 30 2015 *) %o A224924 (Python) %o A224924 for n in range(99): %o A224924 s = 0 %o A224924 for i in range(n+1): %o A224924 for j in range(n+1): %o A224924 s += i & j %o A224924 print(s, end=',') %o A224924 (PARI) a(n)=sum(i=0,n,sum(j=0,n,bitand(i,j))); \\ _R. J. Cano_, Aug 21 2013 %Y A224924 Cf. A004125, A222423, A224915, A224923, A000217. %K A224924 nonn,base %O A224924 0,3 %A A224924 _Alex Ratushnyak_, Apr 19 2013