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.

A127264 Nearest integer to 2*(Sum_{i=1..10^n/2} 1/i) - 1.

This page as a plain text file.
%I A127264 #24 Aug 31 2018 09:25:41
%S A127264 4,8,13,17,22,26,31,36,40,45,49,54,59,63,68,72,77,82,86,91,95,100,105,
%T A127264 109,114,119,123,128,132,137,142,146,151,155,160,165,169,174,178,183,
%U A127264 188,192,197,201,206,211,215,220,224,229,234,238,243,247,252,257,261,266,270,275
%N A127264 Nearest integer to 2*(Sum_{i=1..10^n/2} 1/i) - 1.
%C A127264 The original definition was: Nearest integer to Sum[(10^n-i)/i,{i,1,10^n/2}]/(10^n/2), but this was simplified to the present definition by _Jon E. Schoenfield_, Aug 05 2008.
%H A127264 Jon E. Schoenfield, <a href="/A127264/b127264.txt">Table of n, a(n) for n = 1..1000</a>
%F A127264 a(n) = round(2 * (log(m) + Gamma) + 1/m - ...) - 1 where m = 10^n / 2 and Gamma = 0.57721566490153286... (the Euler-Mascheroni constant A001620). - _Jon E. Schoenfield_, Aug 05 2008
%e A127264 a(1)=4 because round((9/1 + 8/2 + 7/3 + 6/4 + 5/5)/5) is 4.
%e A127264 a(2)=8 because round((99/1 + 98/2 + ... + 50/50))/50 is 8.
%p A127264 for i from 10 to 11 by 2 do s:=0; t:=0; for d from i/2 to i -1 do s:= s + (d / (i - d)); t:= t +1; end do; print(round((s / t))); end do;
%t A127264 Table[Round[-1 + 2*HarmonicNumber[Floor[10^n/2]]], {n, 1, 50}] (* _G. C. Greubel_, Aug 31 2018 *)
%o A127264 (PARI) a(n)={ my(i,a=0); for(i=1, 10^n/2, a += 1/i); return(round(2*a-1)); }
%o A127264 main(size)={return(vector(size,m,a(m)));} /* _Anders Hellström_, Jul 12 2015 */
%Y A127264 Different from A004081, although the sequences have the same first few terms.
%K A127264 nonn
%O A127264 1,1
%A A127264 _Ben Paul Thurston_, Mar 27 2007
%E A127264 Extended and edited by _John W. Layman_, Jul 10 2007
%E A127264 Terms from a(11) onwards from _Jon E. Schoenfield_, Aug 05 2008