cp's OEIS Frontend

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.

A173318 Partial sums of A005811.

This page as a plain text file.
%I A173318 #30 Aug 27 2021 11:03:10
%S A173318 0,1,3,4,6,9,11,12,14,17,21,24,26,29,31,32,34,37,41,44,48,53,57,60,62,
%T A173318 65,69,72,74,77,79,80,82,85,89,92,96,101,105,108,112,117,123,128,132,
%U A173318 137,141,144,146,149,153,156,160,165,169,172,174,177,181,184,186,189
%N A173318 Partial sums of A005811.
%C A173318 Partial sums of number of runs in binary expansion of n (n>0). Partial sums of number of 1's in Gray code for n. The subsequence of squares in this partial sum begins 0, 1, 4, 9, 144, 169, 256, 289, 324 (since we also have 32 and 128 I wonder about why so many powers). The subsequence of primes in this partial sum begins: 3, 11, 17, 29, 31, 37, 41, 53, 79, 89, 101, 137, 149, 181, 191, 197, 229, 271.
%C A173318 Note: A227744 now gives the squares, which occur at positions given by A227743. - _Antti Karttunen_, Jul 27 2013
%H A173318 Antti Karttunen, <a href="/A173318/b173318.txt">Table of n, a(n) for n = 0..8191</a>
%H A173318 Richard Blecksmith and Purushottam W. Laud, <a href="http://www.jstor.org/stable/2975267">Some Exact Number Theory Computations via Probability Mechanisms</a>, American Mathematical Monthly, volume 102, number 10, December 1995, pages 893-903, with a(n) = Sum_{j=0..n} b_j as calculated in section 2.
%H A173318 Hsien-Kuei Hwang, Svante Janson and Tsung-Hsi Tsai, <a href="https://doi.org/10.1145/3127585">Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications</a>, ACM Transactions on Algorithms, volume 13, number 4, December 2017, article number 47, pages 1-43.  Also <a href="http://algo.stat.sinica.edu.tw/hk/?p=1043">first authors' copy</a>, 2016.  See example 5.5.
%H A173318 Kevin Ryde, <a href="http://user42.tuxfamily.org/dragon/index.html">Iterations of the Dragon Curve</a>, see index "DirCumul".
%F A173318 a(n) = sum(i=0..n) A005811(i) = sum(i=0..n) (A037834(i)+1) = sum(i=0..n) (A069010(i) + A033264(i)).
%F A173318 a(A000225(n)) = A001787(n) = A000788(A000225(n)). - _Antti Karttunen_, Jul 27 2013 & Aug 09 2013
%F A173318 a(2n) = 2*a(n) + n - 2*(ceiling(A005811(n)/2) - (n mod 2)), a(2n+1) = 2*a(n) + n + 1. - _Ralf Stephan_, Aug 11 2013
%e A173318 1 has 1 run in its binary representation "1".
%e A173318 2 has 2 runs in its binary representation "10".
%e A173318 3 has 1 run in its binary representation "11".
%e A173318 4 has 2 runs in its binary representation "100".
%e A173318 5 has 3 runs in its binary representation "101".
%e A173318 Thus a(1) = 1, a(2) = 1+2 = 3, a(3) = 1+2+1 = 4, a(4) = 1+2+1+2 = 6, a(5) = 1+2+1+2+3 = 9.
%t A173318 Accumulate[Join[{0},Table[Length[Split[IntegerDigits[n,2]]],{n,110}]]] (* _Harvey P. Dale_, Jul 29 2013 *)
%o A173318 (PARI) a(n) = my(v=binary(n+1),d=0,e=4); for(i=1,#v, if(v[i], v[i]=#v-i+d;d+=e;e=0, e=4)); fromdigits(v,2)>>1; \\ _Kevin Ryde_, Aug 27 2021
%Y A173318 Cf. A005811, A000788, A056539, A014707, A014577, A082410, A000975, A034947.
%Y A173318 Cf. also A227737, A227741, A227742.
%Y A173318 Cf. A227744 (squares occurring), A227743 (indices of squares).
%K A173318 easy,nonn
%O A173318 0,3
%A A173318 _Jonathan Vos Post_, Feb 16 2010