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.

Previous Showing 11-20 of 20 results.

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

A088301 a(n) = p(n)/p(n-1), where p(n) = ( floor(n*log(n)) / Product_{j=2..pi(floor(n*log(n)))} prime(j) )!.

Original entry on oeis.org

1, 2, 4, 48, 90, 12, 3360, 18, 9240, 15600, 756, 31680, 42840, 59280, 1848, 99360, 6497400, 2970, 185136, 234360, 18670080, 347760, 421800, 480480, 557928, 55965360, 70073640, 857280, 98960400, 1157520, 11880, 162983520, 190578024
Offset: 2

Views

Author

Roger L. Bagula, Nov 04 2003

Keywords

Crossrefs

Programs

  • Magma
    m:=50;
    b:= [ #PrimesUpTo(n): n in [1..2+Floor(2*m*Log(2*m))] ];
    f:= func< n | Factorial( Floor(n*Log(n)) )/(&*[ NthPrime(j): j in [2..b[Floor(n*Log(n))]] ]) >;
    A088301:= func< n | n le 3 select n-1 else f(n)/f(n-1) >;
    [A088301(n): n in [2..m]]; // G. C. Greubel, Dec 18 2022
    
  • Mathematica
    p[n_]:=Factorial[Floor[n*Log[n]]]/ Product[Prime[i], {i, 2, PrimePi[Floor[n*Log[n]]]}];
    Table[p[n]/p[n-1], {n,2,50}]
  • SageMath
    def p(n): return factorial( floor(n*log(n)) )/product(nth_prime(j) for j in (2..prime_pi(floor(n*log(n)))))
    def A088301(n): return p(n)/p(n-1)
    [A088301(n) for n in range(2,50)] # G. C. Greubel, Dec 18 2022

Formula

a(n) = p(n)/p(n-1), where p(n) = ( floor(n*log(n)) / Product_{j=2..pi(floor(n*log(n)))} prime(j) )!.

Extensions

Edited by G. C. Greubel, Dec 18 2022

A156625 Floor(integral of log(x) from 1 to n).

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 9, 11, 14, 16, 18, 21, 23, 26, 29, 32, 35, 37, 40, 43, 47, 50, 53, 56, 59, 62, 66, 69, 73, 76, 79, 83, 86, 90, 94, 97, 101, 104, 108, 112, 115, 119, 123, 127, 131, 134, 138, 142
Offset: 2

Views

Author

Jack W Grahl, Feb 11 2009

Keywords

Crossrefs

Cf. A156624.

Programs

  • Mathematica
    Table[Floor[Integrate[Log[n],{n,1,x}]],{x,2,50}] (* Harvey P. Dale, May 08 2023 *)
  • Sage
    [floor(N(integral(ln(x), x, 1, n))) for n in range (2,50)]

Formula

a(n)=A050504(n)-n+1. - R. J. Mathar, Feb 12 2009

A212293 Integer part of n*log(n)^2.

Original entry on oeis.org

0, 0, 3, 7, 12, 19, 26, 34, 43, 53, 63, 74, 85, 97, 110, 122, 136, 150, 164, 179, 194, 210, 226, 242, 259, 275, 293, 310, 328, 347, 365, 384, 403, 422, 442, 462, 482, 502, 523, 544, 565, 586, 608, 630, 652, 674, 696, 719, 742, 765, 788, 811, 835, 859, 883, 907, 931, 956
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A050504.

Programs

  • Mathematica
    Table[Floor[n Log[n]^2],{n,60}] (* Harvey P. Dale, Oct 24 2018 *)
  • PARI
    a(n)=n*log(n)^2\1

Formula

a(n) = floor(n*log(n)^2).

A235707 a(n) = floor(n^2 * log(n)).

Original entry on oeis.org

0, 2, 9, 22, 40, 64, 95, 133, 177, 230, 290, 357, 433, 517, 609, 709, 818, 936, 1062, 1198, 1342, 1496, 1658, 1830, 2011, 2202, 2402, 2612, 2831, 3061, 3300, 3548, 3807, 4076, 4355, 4644, 4943, 5252, 5572, 5902, 6242, 6593, 6954, 7326, 7708, 8101, 8504, 8919
Offset: 1

Views

Author

Alex Ratushnyak, Apr 20 2014

Keywords

Crossrefs

Cf. A050504.

Programs

  • Magma
    [Floor(n^2 * Log(n)): n in [1..50]]; // Vincenzo Librandi, Apr 22 2014
  • Mathematica
    Table[Floor[n^2 Log[n]], {n, 1, 50}] (* Vincenzo Librandi, Apr 22 2014 *)
  • Python
    import math
    for n in range(1, 100):  print(int(n*n*math.log(n)), end=', ')
    

A076829 a(n) = floor(log(log(n^n^n))).

Original entry on oeis.org

1, 3, 5, 8, 11, 14, 17, 20, 23, 27, 30, 34, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 90, 94, 98, 103, 107, 112, 116, 121, 125, 130, 134, 139, 144, 148, 153, 158, 163, 167, 172, 177, 182, 187, 192, 196, 201, 206, 211, 216, 221, 226, 231, 236, 241, 247
Offset: 2

Views

Author

Neil Fernandez, Nov 20 2002

Keywords

Examples

			3^3^3 = 3^27 = 7625597484987. Log(log(7625597484987)) = 3.38..., so a(3)= 3.
		

Crossrefs

Programs

  • Mathematica
    Table[ Floor[ n * Log[n] + Log[ Log[n]]], {n, 2, 60}]

Formula

a(n) = floor(n*log(n) + log(log(n))).

Extensions

Edited by Robert G. Wilson v, Nov 22 2002
Undefined a(1) removed by Sean A. Irvine, Apr 17 2025

A217864 Number of prime numbers between floor(n*log(n)) and (n + 1)*log(n + 1).

Original entry on oeis.org

0, 2, 2, 2, 0, 2, 1, 2, 2, 1, 1, 2, 0, 1, 2, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, 2, 1, 0, 0, 1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 1, 1, 1, 0, 2, 2, 0, 0, 1, 0, 1, 2, 1, 1, 1, 0, 1, 1, 1, 2, 1, 2, 2, 0, 1, 0, 1, 3, 2, 0, 0, 1, 1, 0, 2, 1, 1, 0, 1, 1, 2, 1, 1
Offset: 1

Views

Author

Jon Perry, Oct 13 2012

Keywords

Comments

Conjecture: a(n) is unbounded.
If Riemann Hypothesis is true, this is probably true as the PNT is generally a lower bound for Pi(n).
Conjecture: a(n)=0 infinitely often.
The first conjecture follows from Dickson's conjecture. The second conjecture follows from a theorem of Brauer & Zeitz on prime gaps. - Charles R Greathouse IV, Oct 15 2012

Examples

			log(1)=0 and 2*log(2) ~ 1.38629436112. Hence, a(1)=0.
Floor(2*log(2)) = 1 and 3*log(3) ~ 3.295836866. Hence, a(2)=2.
		

References

  • A. Brauer and H. Zeitz, Über eine zahlentheoretische Behauptung von Legendre, Sitz. Berliner Math. Gee. 29 (1930), pp. 116-125; cited in Erdos 1935.

Crossrefs

An alternate version of A166712.

Programs

  • JavaScript
    function isprime(i) {
    if (i==1) return false;
    if (i==2) return true;
    if (i%2==0) return false;
    for (j=3;j<=Math.floor(Math.sqrt(i));j+=2)
    if (i%j==0) return false;
    return true;
    }
    for (i=1;i<88;i++) {
    c=0;
    for (k=Math.floor(i*Math.log(i));k<=(i+1)*Math.log(i+1);k++) if (isprime(k)) c++;
    document.write(c+", ");
    }
    
  • Mathematica
    Table[s = Floor[n*Log[n]]; PrimePi[(n+1) Log[n+1]] - PrimePi[s] + Boole[PrimeQ[s]], {n, 100}] (* T. D. Noe, Oct 15 2012 *)
  • PARI
    a(n)=sum(k=n*log(n)\1,(n+1)*log(n+1),isprime(k)) \\ Charles R Greathouse IV, Oct 15 2012

A316681 a(n) = floor(n*log(n)/2).

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 6, 8, 9, 11, 13, 14, 16, 18, 20, 22, 24, 26, 27, 29, 31, 34, 36, 38, 40, 42, 44, 46, 48, 51, 53, 55, 57, 59, 62, 64, 66, 69, 71, 73, 76, 78, 80, 83, 85, 88, 90, 92, 95, 97, 100, 102, 105, 107, 110, 112, 115, 117, 120, 122, 125, 127
Offset: 1

Views

Author

Marcos Librán López, Jul 10 2018

Keywords

Examples

			a(1) = floor(1*log(1)/2) = 0;
a(2) = floor(2*log(2)/2) = 0.
		

Crossrefs

Cf. A050504.

Programs

A378422 Primes of the form floor(k*log(k)).

Original entry on oeis.org

3, 5, 13, 19, 23, 29, 59, 97, 271, 281, 307, 313, 383, 421, 443, 449, 499, 557, 691, 709, 727, 733, 739, 751, 757, 769, 787, 947, 953, 971, 1009, 1021, 1091, 1097, 1103, 1129, 1231, 1237, 1283, 1289, 1321, 1367, 1373, 1399, 1439, 1511, 1531, 1571, 1597
Offset: 1

Views

Author

Tristan M. Phillips, Nov 25 2024

Keywords

Crossrefs

Primes corresponding to A066928. Primes in the sequence A050504.
Previous Showing 11-20 of 20 results.