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 A060831 #114 Nov 26 2023 13:34:55 %S A060831 0,1,2,4,5,7,9,11,12,15,17,19,21,23,25,29,30,32,35,37,39,43,45,47,49, %T A060831 52,54,58,60,62,66,68,69,73,75,79,82,84,86,90,92,94,98,100,102,108, %U A060831 110,112,114,117,120,124,126,128,132,136,138,142,144,146,150,152,154,160 %N A060831 a(n) = Sum_{k=1..n} (number of odd divisors of k) (cf. A001227). %C A060831 The old definition was "Number of sums less than or equal to n of sequences of consecutive positive integers (including sequences of length 1)." %C A060831 In other words, a(n) is also the total number of partitions of all positive integers <= n into consecutive parts, n >= 1. - _Omar E. Pol_, Dec 03 2020 %C A060831 Starting with 1 = row sums of triangle A168508. - _Gary W. Adamson_, Nov 27 2009 %C A060831 The subsequence of primes in this sequence begins, through a(100): 2, 5, 7, 11, 17, 19, 23, 29, 37, 43, 47, 73, 79, 173, 181, 223, 227, 229, 233, 263. - _Jonathan Vos Post_, Feb 13 2010 %C A060831 Apart from the initial zero, a(n) is also the total number of subparts of the symmetric representations of sigma of all positive integers <= n. Hence a(n) is also the total number of subparts in the terraces of the stepped pyramid with n levels described in A245092. For more information see A279387 and A237593. - _Omar E. Pol_, Dec 17 2016 %C A060831 a(n) is also the total number of partitions of all positive integers <= n into an odd number of equal parts. - _Omar E. Pol_, May 14 2017 %C A060831 Zero together with the row sums of A235791. - _Omar E. Pol_, Dec 18 2020 %H A060831 Harry J. Smith, <a href="/A060831/b060831.txt">Table of n, a(n) for n = 0..1000</a> %F A060831 a(n) = Sum_{i=1..n} A001227(i). %F A060831 a(n) = a(n-1) + A001227(n). %F A060831 a(n) = n + floor(n/3) + floor(n/5) + floor(n/7) + floor(n/9) + ... %F A060831 a(n) = A006218(n) - A006218(floor(n/2)). %F A060831 a(n) = Sum_{i=1..ceiling(n/2)} A000005(n-i+1). - _Wesley Ivan Hurt_, Sep 30 2013 %F A060831 a(n) = Sum_{i=floor((n+2)/2)..n} A000005(i). - _N. J. A. Sloane_, Dec 06 2020, modified by _Xiaohan Zhang_, Nov 07 2022 %F A060831 G.f.: (1/(1 - x))*Sum_{k>=1} x^k/(1 - x^(2*k)). - _Ilya Gutkovskiy_, Dec 23 2016 %F A060831 a(n) ~ n*(log(2*n) + 2*gamma - 1) / 2, where gamma is the Euler-Mascheroni constant A001620. - _Vaclav Kotesovec_, Jan 30 2019 %e A060831 E.g., for a(7), we consider the odd divisors of 1,2,3,4,5,6,7, which gives 1,1,2,1,2,2,2 = 11. - _Jon Perry_, Mar 22 2004 %e A060831 Example illustrating the old definition: a(7) = 11 since 1, 2, 3, 4, 5, 6, 7, 1+2, 2+3, 3+4, 1+2+3 are all 7 or less. %e A060831 From _Omar E. Pol_, Dec 02 2020: (Start) %e A060831 Illustration of initial terms: %e A060831 Diagram %e A060831 n a(n) %e A060831 0 0 _| %e A060831 1 1 _|1| %e A060831 2 2 _|1 _| %e A060831 3 4 _|1 |1| %e A060831 4 5 _|1 _| | %e A060831 5 7 _|1 |1 _| %e A060831 6 9 _|1 _| |1| %e A060831 7 11 _|1 |1 | | %e A060831 8 12 _|1 _| _| | %e A060831 9 15 _|1 |1 |1 _| %e A060831 10 17 _|1 _| | |1| %e A060831 11 19 _|1 |1 _| | | %e A060831 12 21 |1 | |1 | | %e A060831 ... %e A060831 a(n) is also the total number of horizontal line segments in the first n levels of the diagram. For n = 5 there are seven horizontal line segments, so a(5) = 7. Cf. A237048, A286001. (End) %e A060831 From _Omar E. Pol_, Dec 19 2020: (Start) %e A060831 a(n) is also the number of regions in the diagram of the symmetries of sigma after n stages, including the subparts, as shown below (Cf. A279387): %e A060831 . _ _ _ _ %e A060831 . _ _ _ |_ _ _ |_ %e A060831 . _ _ _ |_ _ _| |_ _ _| |_|_ %e A060831 . _ _ |_ _ |_ |_ _ |_ _ |_ _ |_ _ | %e A060831 . _ _ |_ _|_ |_ _|_ | |_ _|_ | | |_ _|_ | | | %e A060831 . _ |_ | |_ | | |_ | | | |_ | | | | |_ | | | | | %e A060831 . |_| |_|_| |_|_|_| |_|_|_|_| |_|_|_|_|_| |_|_|_|_|_|_| %e A060831 . %e A060831 . 0 1 2 4 5 7 9 %e A060831 (End) %p A060831 A060831 := proc(n) %p A060831 add(numtheory[tau](n-i+1),i=1..ceil(n/2)) ; %p A060831 end proc: %p A060831 seq(A060831(n),n=0..100) ; # _Wesley Ivan Hurt_, Oct 02 2013 %t A060831 f[n_] := Sum[ -(-1^k)Floor[n/(2k - 1)], {k, n}]; Table[ f[n], {n, 0, 65}] (* _Robert G. Wilson v_, Jun 16 2006 *) %t A060831 Accumulate[Table[Count[Divisors[n],_?OddQ],{n,0,70}]] (* _Harvey P. Dale_, Nov 26 2023 *) %o A060831 (PARI) a(n)=local(c);c=0;for(i=1,n,c+=sumdiv(i,X,X%2));c %o A060831 (PARI) for (n=0, 1000, s=n; d=3; while (n>=d, s+=n\d; d+=2); write("b060831.txt", n, " ", s); ) \\ _Harry J. Smith_, Jul 12 2009 %o A060831 (PARI) a(n)=my(n2=n\2); sum(k=1, sqrtint(n), n\k)*2-sqrtint(n)^2-sum(k=1, sqrtint(n2), n2\k)*2+sqrtint(n2)^2 \\ _Charles R Greathouse IV_, Jun 18 2015 %o A060831 (Python) %o A060831 def A060831(n): return n+sum(n//i for i in range(3,n+1,2)) # _Chai Wah Wu_, Jul 16 2022 %o A060831 (Python) %o A060831 from math import isqrt %o A060831 def A060831(n): return ((t:=isqrt(m:=n>>1))+(s:=isqrt(n)))*(t-s)+(sum(n//k for k in range(1,s+1))-sum(m//k for k in range(1,t+1))<<1) # _Chai Wah Wu_, Oct 23 2023 %Y A060831 Zero together with the partial sums of A001227. %Y A060831 Cf. A000005, A001620, A006218, A168508, A235791, A236104, A237048, A237590, A237593, A245092, A279387, A286001. %K A060831 nonn %O A060831 0,3 %A A060831 _Henry Bottomley_, May 01 2001 %E A060831 Definition simplified by _N. J. A. Sloane_, Dec 05 2020