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 A006590 M2522 #42 Sep 08 2022 08:44:35 %S A006590 1,3,6,9,13,16,21,24,29,33,38,41,48,51,56,61,67,70,77,80,87,92,97,100, %T A006590 109,113,118,123,130,133,142,145,152,157,162,167,177,180,185,190,199, %U A006590 202,211,214,221,228,233,236,247,251,258,263,270,273,282,287,296,301 %N A006590 a(n) = Sum_{k=1..n} ceiling(n/k). %C A006590 The following sequences all have the same parity: A004737, A006590, A027052, A071028, A071797, A078358, A078446. - _Jeremy Gardiner_, Mar 16 2003 %C A006590 Given the fact that ceiling(x) <= x+1, we can, using well known results for the harmonic series, easily derive that n*log(n) <= a(n) <= n*(1+log(n)) + n = n(log(n)+2). - _Stefan Steinerberger_, Apr 08 2006 %D A006590 _Marc LeBrun_, personal communication. %D A006590 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006590 T. D. Noe, <a href="/A006590/b006590.txt">Table of n, a(n) for n = 1..1000</a> %H A006590 M. Le Brun, <a href="/A006577/a006577.pdf">Email to N. J. A. Sloane, Jul 1991</a> %F A006590 a(n) = n+Sum_{k=1..n-1} tau(k). - _Vladeta Jovovic_, Oct 17 2002 %F A006590 a(n) = 1 + a(n-1) + tau(n-1), a(n) = A006218(n-1) + n. - _T. D. Noe_, Jan 05 2007 %F A006590 a(n) = a(n-1) + A000005(n) + 1 for n >= 2. a(n) = A161886(n) - A000005(n) + 1 = A161886(n-1) + 2 = A006218(n) + A049820(n) for n >= 1. - _Jaroslav Krizek_, Nov 14 2009 %p A006590 seq(add(ceil(n/j), j = 1..n), n = 1..60); # _G. C. Greubel_, Nov 07 2019 %t A006590 Table[Sum[Ceiling[n/i], {i, 1, n}], {n, 1, 60}] (* _Stefan Steinerberger_, Apr 08 2006 *) %t A006590 nxt[{n_,a_}]:={n+1,a+DivisorSigma[0,n]+1}; Transpose[NestList[nxt,{1,1},60]][[2]] (* _Harvey P. Dale_, Aug 23 2013 *) %o A006590 (Haskell) %o A006590 a006590 n = sum $ map f [1..n] where %o A006590 f x = y + 1 - 0 ^ r where (y, r) = divMod n x %o A006590 -- _Reinhard Zumkeller_, Feb 18 2013 %o A006590 (PARI) first(n)=my(v=vector(n,i,i),s); for(i=1,n-1,v[i+1]+=s+=numdiv(i)); v \\ _Charles R Greathouse IV_, Feb 07 2017 %o A006590 (PARI) a(n) = n + sum(k=1, n-1, (n-1)\k); \\ _Michel Marcus_, Oct 10 2021 %o A006590 (Magma) [&+[Ceiling(n/j): j in [1..n]] : n in [1..60]]; // _G. C. Greubel_, Nov 07 2019 %o A006590 (Sage) [sum(ceil(n/j) for j in (1..n)) for n in (1..60)] # _G. C. Greubel_, Nov 07 2019 %o A006590 (Python) %o A006590 from math import isqrt %o A006590 def A006590(n): return (lambda m: n+2*sum((n-1)//k for k in range(1, m+1))-m*m)(isqrt(n-1)) # _Chai Wah Wu_, Oct 09 2021 %Y A006590 Cf. A000005, A006218. %K A006590 nonn,nice,easy %O A006590 1,2 %A A006590 _N. J. A. Sloane_ %E A006590 More terms from _Stefan Steinerberger_, Apr 08 2006