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.

A084972 When A058033 first reaches n.

Original entry on oeis.org

1, 2, 3, 4, 7, 12, 20, 35, 57, 102, 182, 323, 585, 1061, 1943, 3521, 6606
Offset: 1

Views

Author

Robert G. Wilson v, May 22 2003

Keywords

Crossrefs

Cf. A058033.

Programs

  • Mathematica
    Primorial[n_] := Product[Prime[i], {i, 1, n}]; f[n_] := Block[{k = 2, p = 1}, While[q = Floor[ Log[2, Primorial[k]]]; q - p != n, k++; p = q]; k - 1]; Table[ f[n], {n, 1, 17}]

A054850 Binary logarithm of n-th primorial, rounded down to an integer.

Original entry on oeis.org

1, 2, 4, 7, 11, 14, 18, 23, 27, 32, 37, 42, 48, 53, 59, 64, 70, 76, 82, 88, 95, 101, 107, 114, 120, 127, 134, 140, 147, 154, 161, 168, 175, 182, 189, 197, 204, 211, 219, 226, 234, 241, 249, 256, 264, 272, 279, 287, 295, 303, 311, 318, 326, 334, 342, 350, 358, 367
Offset: 1

Views

Author

Lekraj Beedassy, May 22 2003

Keywords

Comments

A measure of the growth rate of the primorials.

Examples

			The product of the first four primes is 2 * 3 * 5 * 7 = 210. In binary, 210 is 11010010, an 8-bit number, and we see that 2^7 < 210 < 2^8. And indeed log_2 210 = 7.7142455... and thus a(4) = 7.
a(5) = floor(log_2 2310) = floor(11.1736771363...) = 11.
		

Crossrefs

Equals A045716(n) - 1.

Programs

  • Maple
    a := n -> ilog2(mul(ithprime(i), i=1..n)):
    seq(a(n), n=1..58); # Peter Luschny, Oct 18 2018
  • Mathematica
    Table[Floor[Log[2, Product[Prime[i], {i, n}]]], {n, 60}]
    Floor[Log2[#]]&/@FoldList[Times,Prime[Range[60]]] (* Harvey P. Dale, Aug 04 2021 *)
  • PARI
    a(n) = logint(prod(k=1, n, prime(k)), 2); \\ Michel Marcus, Jan 06 2020

Formula

a(n) = floor(log_2 n#) = m such that 2^m <= p(n)# < 2^(m + 1), where p(n)# is the primorial of the n-th prime (A002110).
a(n) = A000523(A002110(n)).
a(n) ~ n log n. - Charles R Greathouse IV, Aug 25 2024

Extensions

Edited, corrected and extended by Robert G. Wilson v, May 22 2003
Name simplified by Alonso del Arte, Oct 14 2018 (old name is now first formula).

A084321 Least number k such that between k! and (k+1)! there are n powers of 2 (each interval includes (k+1)! but not k!).

Original entry on oeis.org

1, 3, 5, 10, 19, 35, 64, 139, 256, 536, 1061, 2095, 4169, 8282, 16517, 32903, 65646, 131205, 262579, 525083, 1048893, 2098826, 4195521, 8390583, 16782032, 33560609, 67118347, 134229613, 268453180, 536890474, 1073764782, 2147523518
Offset: 1

Views

Author

Labos Elemer, Jun 19 2003

Keywords

Comments

a(n) is near the (n-1)th power of 2, the difference is A085355.

Examples

			a(3)=5 since between 5!=120 and 6!=720 is the first time 3 powers of 2 arise, namely, 128, 256 and 512.
		

Crossrefs

Programs

  • C
    /* See links */
  • Mathematica
    LogBase2Stirling[n_] := N[ Log[2, 2 Pi n]/2 + n*Log[2, n/E] + Log[2, 1 + 1/(12n) + 1/(288n^2) - 139/(51840n^3) - 571/(2488320n^4) + 163879/(209018880n^5)], 64]; k = 1; Do[ While[ Floor[ LogBase2Stirling[k + 1]] - Floor[ LogBase2Stirling[k]] < n, k++ ]; Print[k], {n, 1, 33}]

Formula

a(n) = minimum x for which floor(log_2((x+1)!)) - floor(log_2(x!)) = n.
a(n) = minimum x for which A084320(x) = n.

Extensions

Edited and extended by Robert G. Wilson v, Jun 24 2003
Definition clarified by Jianing Song, Aug 08 2022
a(26) corrected by Kevin Ryde, Apr 25 2024

A084320 Number of powers of two between 2 consecutive factorials (2! including).

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 3, 3, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 5, 5, 4, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 6, 5, 5, 6, 5, 6, 5, 6, 5, 6, 6, 5, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 5, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 7, 6, 6, 7, 6, 6, 7, 6, 7, 6, 7, 6, 6, 7, 7, 6, 7, 6, 7, 6, 7, 7, 6, 7, 7, 6, 7, 7, 6
Offset: 1

Views

Author

Labos Elemer, Jun 19 2003

Keywords

Examples

			n=7: a(7)=3 because between 5040 and 40320 three powers of 2 occur: 8192, 16384 and 32768.
		

Crossrefs

Programs

  • Mathematica
    Table[Floor[Log[2, (w+1)! ]//N]-Floor[Log[2, w! ]//N], {w, 1, 128}]
  • PARI
    a(n)=if(n<6,(n+1)\2,log((n+1)!)\log(2)-log(n!)\log(2)) \\ Charles R Greathouse IV, Dec 26 2013

Formula

a(n) = A067850(n+1) - A067850(n).
a(n) = A000523(n) + O(1). - Charles R Greathouse IV, Dec 26 2013
Showing 1-4 of 4 results.