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-4 of 4 results.

A050504 Integer part of n*log(n).

Original entry on oeis.org

0, 1, 3, 5, 8, 10, 13, 16, 19, 23, 26, 29, 33, 36, 40, 44, 48, 52, 55, 59, 63, 68, 72, 76, 80, 84, 88, 93, 97, 102, 106, 110, 115, 119, 124, 129, 133, 138, 142, 147, 152, 156, 161, 166, 171, 176, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225
Offset: 1

Views

Author

N. J. A. Sloane, Dec 27 1999

Keywords

Comments

Additive basis of order 3: all nonnegative integers can be written as a sum of three elements from this sequence. It appears that other than 7, 12, and 25, all numbers can be written as the sum of two members of this sequence. - Charles R Greathouse IV, Apr 23 2012

Crossrefs

See A050503 for more information.

Programs

Formula

a(n) = floor(n*log(n)). - Enrique Pérez Herrero, Jul 29 2009

A050502 a(n) = ceiling(n*log(n)).

Original entry on oeis.org

0, 2, 4, 6, 9, 11, 14, 17, 20, 24, 27, 30, 34, 37, 41, 45, 49, 53, 56, 60, 64, 69, 73, 77, 81, 85, 89, 94, 98, 103, 107, 111, 116, 120, 125, 130, 134, 139, 143, 148, 153, 157, 162, 167, 172, 177, 181, 186, 191, 196, 201, 206, 211, 216, 221, 226, 231, 236, 241
Offset: 1

Views

Author

N. J. A. Sloane, Dec 27 1999

Keywords

Crossrefs

See A050503 for more information.

A135736 Nearest integer to n*Sum_{k=1..n} 1/k = rounded expected coupon collection numbers.

Original entry on oeis.org

0, 1, 3, 6, 8, 11, 15, 18, 22, 25, 29, 33, 37, 41, 46, 50, 54, 58, 63, 67, 72, 77, 81, 86, 91, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 161, 166, 171, 176, 182, 187, 192, 198, 203, 209, 214, 219, 225, 230, 236, 242, 247, 253, 258, 264, 269, 275
Offset: 0

Views

Author

M. F. Hasler, Nov 29 2007

Keywords

Comments

Somewhat more realistic than A052488 but more optimistic than A060293, the expected number of boxes that must be bought to get the full collection of N objects, if each box contains any one of them at random. See also comments in A060293, A052488.

Examples

			a(0) = 0 since nothing needs to be bought if nothing is to be collected.
a(1) = 1 since only 1 box needs to be bought if only 1 object is to be collected.
a(2) = 3 since the chance of getting the other object at the second purchase is only 1/2, so it takes 2 boxes on the average to get it.
a(3) = 6 since the chance of getting a new object at the second purchase is 2/3 so it takes 3/2 boxes in the mean, then the chance becomes 1/3 to get the 3rd, i.e., 3 other boxes on the average to get the full collection and the rounded value of 1 + 3/2 + 3 = 11/2 = 5.5 is 6.
		

Crossrefs

Programs

  • Maple
    seq(round(n*harmonic(n)), n=1..100); # Robert Israel, Oct 31 2016
  • Mathematica
    Table[Round[n*Sum[1/k, {k, 1, n}]], {n,0,25}] (* G. C. Greubel, Oct 29 2016 *)
  • PARI
    A135736(n)=round(n*sum(i=1,n,1/i))
    
  • Python
    n=100 #set the number of terms you want to calculate here
    ans=0
    finalans = []
    finalans.append(0) #continuity with A135736
    for i in range(1, n+1):
        ans+=(1/i)
        finalans.append(int(round(ans*i)))
    print(finalans)
    # Adam Hugill, Feb 14 2022

Formula

a(n) = round(n*A001008(n)/A002805(n)) = either A052488(n) or A060293(n).
a(n) ~ A060293(n) ~ A052488(n) ~ A050502(n) ~ A050503(n) ~ A050504(n) (asymptotically)
Conjecture: a(n) = round(n*(log(n) + gamma) + 1/2) for n > 0, where gamma = A001620. - Ilya Gutkovskiy, Oct 31 2016
The conjecture is false: a(2416101) = 36905656 while round(2416101*(log(2416101) + gamma) + 1/2) = 36905657, with the unrounded numbers being 36905656.499999982... and 36905656.500000016.... Heuristically this should happen infinitely often. - Charles R Greathouse IV, Oct 31 2016

A250621 a(n) = floor(n*log(prime(n))).

Original entry on oeis.org

0, 2, 4, 7, 11, 15, 19, 23, 28, 33, 37, 43, 48, 52, 57, 63, 69, 73, 79, 85, 90, 96, 101, 107, 114, 119, 125, 130, 136, 141, 150, 156, 162, 167, 175, 180, 187, 193, 199, 206, 212, 218, 225, 231, 237, 243, 251, 259, 265, 271, 278, 284, 290, 298, 305, 312, 318, 324, 331
Offset: 1

Views

Author

Freimut Marschner, Nov 26 2014

Keywords

Comments

From n < prime(n), n >= 1 follows that n*log(n) < prime(n) < n*log(prime(n)), n >= 4. This inequality is included in the prime number theorem PNT.

Examples

			For n = 1, prime(1) = 2, floor(1*0.69... = 0.69...) = 0 ;
For n = 25, prime(25) = 97, floor(25*4.57... = 114.36...) = 114.
		

Crossrefs

Cf. A050504 (floor(n*log(n))), A086861 (floor(prime(n)/log(prime(n)))), A085581 (floor(prime(n)/log(n))), A050504 (integer part of n*log(n)), A050503 (nearest integer to n*log(n)), A050502 (ceiling of n*log(n)).

Programs

  • Mathematica
    Table[Floor[n Log[Prime[n]]],{n,60}] (* Harvey P. Dale, Aug 13 2019 *)
  • PARI
    vector(100,n,floor(n*log(prime(n)))) \\ Derek Orr, Nov 28 2014
Showing 1-4 of 4 results.