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 A006520 M2344 #83 Apr 18 2025 21:39:10 %S A006520 1,3,4,8,9,11,12,20,21,23,24,28,29,31,32,48,49,51,52,56,57,59,60,68, %T A006520 69,71,72,76,77,79,80,112,113,115,116,120,121,123,124,132,133,135,136, %U A006520 140,141,143,144,160,161,163,164,168,169,171,172,180,181,183,184,188,189 %N A006520 Partial sums of A006519. %C A006520 The subsequence of primes in this partial sum begins: 3, 11, 23, 29, 31, 59, 71, 79, 113, 163, 181. The subsequence of powers in this partial sum begins: 1, 4, 8, 9, 32, 49, 121, 144, 169. - _Jonathan Vos Post_, Feb 18 2010 %D A006520 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006520 Vincenzo Librandi, <a href="/A006520/b006520.txt">Table of n, a(n) for n = 1..1001</a> [Jul 23 2013; offset adapted by _Georg Fischer_, Jan 27 2020] %H A006520 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, p. 44. %H A006520 Victor Meally, <a href="/A006516/a006516.pdf">Letter to N. J. A. Sloane, May 1975</a>. %H A006520 Ralf Stephan, <a href="/somedcgf.html">Some divide-and-conquer sequences with (relatively) simple ordinary generating functions</a>. %H A006520 Ralf Stephan, <a href="/A079944/a079944.ps">Table of generating functions</a>. %F A006520 a(n)/(n*log(n)) is bounded. - _Benoit Cloitre_, Dec 17 2002 %F A006520 G.f.: (1/(x*(1-x))) * (x/(1-x) + Sum_{k>=1} 2^(k-1)*x^2^k/(1-x^2^k)). - _Ralf Stephan_, Apr 17 2003 %F A006520 a(n) = b(n+1), with b(2n) = 2b(n) + n, b(2n+1) = 2b(n) + n + 1. - _Ralf Stephan_, Sep 07 2003 %F A006520 a(2^k-1) = k*2^(k-1) = A001787(k) for any k > 0. - _Rémy Sigrist_, Jan 21 2021 %F A006520 a(n) ~ (1/(2*log(2)))*n*log(n) + (3/4 + (gamma-1)/(2*log(2)))*n, where gamma is Euler's constant (A001620). - _Amiram Eldar_, Nov 15 2022 %F A006520 a(n) = A136013(n) + n = A159699(n) - n. - _Alan Michael Gómez Calderón_, Apr 13 2025 %t A006520 Table[ 2^IntegerExponent[n, 2], {n, 1, 70}] // Accumulate (* _Jean-François Alcover_, May 14 2013 *) %o A006520 (PARI) a(n)=sum(i=1,n,2^valuation(i,2)) %o A006520 (Python) %o A006520 def A006520(n): return sum(i&-i for i in range(1,n+1)) # _Chai Wah Wu_, Jul 14 2022 %Y A006520 First differences of A022560. %Y A006520 Cf. A001620, A001787, A006519, A136013, A159699. %K A006520 nonn,easy %O A006520 1,2 %A A006520 _N. J. A. Sloane_, _Simon Plouffe_ %E A006520 More terms from _Benoit Cloitre_, Dec 17 2002 %E A006520 Offset changed to 1 by _N. J. A. Sloane_, Oct 18 2019