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.

Showing 1-2 of 2 results.

A226190 Least positive integer k such that 1 + 1/2 + ... + 1/k >= log(n).

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 24, 24, 25, 25, 26, 26, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 38, 38, 39, 39, 40, 40, 41, 42, 42, 43, 43, 44, 44, 45
Offset: 1

Views

Author

Clark Kimberling, May 30 2013

Keywords

Examples

			a(9) = 5 because 1 + 1/2 + 1/3 + 1/4 < log(9) < 1 + 1/2 + 1/3 + 1/4 + 1/5.
		

Crossrefs

Programs

  • Mathematica
    z = 80; f[n_] := 1/n; Do[s = 0; a[n] = NestWhile[# + 1 &, 1, ! (s += f[#]) > Log[n] &], {n, 1, z}]; m = Map[a, Range[z]]

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

Original entry on oeis.org

4, 8, 13, 17, 22, 26, 31, 36, 40, 45, 49, 54, 59, 63, 68, 72, 77, 82, 86, 91, 95, 100, 105, 109, 114, 119, 123, 128, 132, 137, 142, 146, 151, 155, 160, 165, 169, 174, 178, 183, 188, 192, 197, 201, 206, 211, 215, 220, 224, 229, 234, 238, 243, 247, 252, 257, 261, 266, 270, 275
Offset: 1

Views

Author

Ben Paul Thurston, Mar 27 2007

Keywords

Comments

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.

Examples

			a(1)=4 because round((9/1 + 8/2 + 7/3 + 6/4 + 5/5)/5) is 4.
a(2)=8 because round((99/1 + 98/2 + ... + 50/50))/50 is 8.
		

Crossrefs

Different from A004081, although the sequences have the same first few terms.

Programs

  • Maple
    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;
  • Mathematica
    Table[Round[-1 + 2*HarmonicNumber[Floor[10^n/2]]], {n, 1, 50}] (* G. C. Greubel, Aug 31 2018 *)
  • PARI
    a(n)={ my(i,a=0); for(i=1, 10^n/2, a += 1/i); return(round(2*a-1)); }
    main(size)={return(vector(size,m,a(m)));} /* Anders Hellström, Jul 12 2015 */

Formula

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

Extensions

Extended and edited by John W. Layman, Jul 10 2007
Terms from a(11) onwards from Jon E. Schoenfield, Aug 05 2008
Showing 1-2 of 2 results.