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

A065067 First differences of A065027.

Original entry on oeis.org

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

Views

Author

Floor van Lamoen, Nov 07 2001

Keywords

Crossrefs

Cf. A065027.

Programs

  • Mathematica
    f[1] = 2; f[n_] := f[n] = Block[{k = f[n - 1]}, While[k! <= n^k, k++ ]; k]; t = Table[ f[n], {n, 1, 110}]; Drop[t, 1] - Drop[t, -1]
    sm0[n_]:=Module[{m=1},While[n^m>=m!,m++];m]; Differences[Array[sm0,120]] (* Harvey P. Dale, Jan 24 2018 *)
  • PARI
    { m=1; p=2; for (n=1, 1000, until ((n + 1)^m < m!, m++); a=m - p; p=m; write("b065067.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 05 2009

Formula

a(n) = A065027(n+1) - A065027(n).

Extensions

More terms from Robert G. Wilson v, Jul 12 2003
a(0)=1 prepended by Alois P. Heinz, Dec 21 2019

A230319 Least positive k such that k! > k^n.

Original entry on oeis.org

2, 3, 4, 6, 7, 8, 10, 11, 12, 14, 15, 16, 18, 19, 20, 22, 23, 24, 25, 27, 28, 29, 31, 32, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 46, 47, 48, 49, 51, 52, 53, 54, 55, 57, 58, 59, 60, 62, 63, 64, 65, 67, 68, 69, 70, 71, 73, 74, 75, 76, 78, 79, 80, 81, 82, 84, 85, 86, 87, 88
Offset: 0

Views

Author

Alex Ratushnyak, Oct 15 2013

Keywords

Comments

Numbers that are not in the sequence: 0, 1, 5, 9, 13, 17, 21, 26, 30, 35, 40, 45, 50, 56, 61, 66, 72, 77, 83, 89, 95, 100, 106, 112, 118, 124, 130, 137, 143, 149, 155, 161, 168, ...
It appears that a(n) = A277675(n) + 2 for n >= 1. - Hugo Pfoertner, Jan 27 2021
Sánchez Garza and Treviño proved that the difference between any two consecutive elements is 1 or 2 and that the counting function up to x is x+x/log x + o(x/log x). - Enrique Treviño, Jan 30 2021

Examples

			Least k>0 such that k! > k^3 is k=6.
For k=5: 5! = 120 < 125 = 5^3.
For k=6: 6! = 720 > 216 = 6^3.
So a(3) = 6.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 1; While[k^n >= k!, k++]; k, {n, 0, 100}] (* T. D. Noe, Oct 18 2013 *)
  • PARI
    a(n) = my(k=1); while (k^n >= k!, k++); k; \\ Michel Marcus, Jan 27 2021
  • Python
    import math
    for n in range(333):
      for k in range(1, 100000):
        if math.factorial(k) > k**n:
          print(str(k), end=', ')
          break
    

A309087 a(n) = Sum_{k >= 0} floor(n^k / k!).

Original entry on oeis.org

1, 2, 6, 18, 50, 143, 397, 1088, 2973, 8093, 22014, 59861, 162742, 442396, 1202589, 3268996, 8886090, 24154933, 65659949, 178482278, 485165168, 1318815708, 3584912818, 9744803414, 26489122097, 72004899306, 195729609397, 532048240570, 1446257064252
Offset: 0

Views

Author

Rémy Sigrist, Jul 11 2019

Keywords

Comments

This sequence is inspired by the Maclaurin series for the exponential function.
The series in the name is well defined; for any n > 0, only the first A065027(n) terms are different from zero.

Examples

			For n = 3:
- we have:
  k  floor(3^k / k!)
  -  ---------------
  0                1
  1                3
  2                4
  3                4
  4                3
  5                2
  6                1
  >=7              0
- hence a(3) = 1 + 3 + 4 + 4 + 3 + 2 + 1 = 18.
		

Crossrefs

See A309103, A309104, A309105 for similar sequences.

Programs

  • PARI
    a(n) = { my (v=0, d=1); for (k=1, oo, if (d<1, return (v), v += floor(d); d *= n/k)) }

Formula

a(n) ~ exp(n) as n tends to infinity.
a(n) <= A000149(n).
a(n) = A309104(n) + A309105(n).

A085830 Least number k such that (10^n)^k < k!.

Original entry on oeis.org

2, 25, 269, 2714, 27177, 271822, 2718274, 27182809, 271828173, 2718281817, 27182818272, 271828182832, 2718281828444, 27182818284575, 271828182845887, 2718281828459027, 27182818284590433, 271828182845904503
Offset: 0

Views

Author

Robert G. Wilson v, Jul 13 2003

Keywords

Comments

A085830(n) = A065027(10^n). This should confirm that the lim n -> infinity of A065027(n)/n -> e from below.
a(63) differs from the Floor(10^63* e) by only 33.

Crossrefs

Programs

  • Mathematica
    LogBaseBStirling[b_, n_] := Block[{}, N[ Log[b, 2*Pi*n]/2 + n*Log[b, n/E] + Log[b, 1 + 1/(12n) + 1/(288n^2) - 139/(51840n^3) - 571/(2488320n^4) + 163879/(209018880n^5)], 64]]; f[0] = 2; f[n_] := f[n] = Block[{k = 10*g[n - 1]}, While[ LogBaseBStirling[10^n, k] <= k, k++ ]; k]; Table[ f[n], {n, 1, 18}]

A086824 Least positive k such that k! >= n^k.

Original entry on oeis.org

1, 1, 4, 7, 9, 12, 14, 17, 20, 22, 25, 28, 30, 33, 36, 38, 41, 44, 47, 49, 52, 55, 57, 60, 63, 65, 68, 71, 73, 76, 79, 82, 84, 87, 90, 92, 95, 98, 101, 103, 106, 109, 111, 114, 117, 119, 122, 125, 128, 130, 133, 136, 138, 141, 144, 147, 149, 152, 155, 157, 160, 163, 166
Offset: 0

Views

Author

Benoit Cloitre, Aug 07 2003

Keywords

Comments

Suggested by Richard-Andre Jeannin (andre-jeannin.richard(AT)wanadoo.fr).

Crossrefs

Variant of A065027. - R. J. Mathar, Sep 12 2008

Programs

  • Maple
    a:= proc(n) option remember; local k; if n<0 then 1 else
          for k from a(n-1) while k! < n^k do od; k fi
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, Jan 15 2022
  • Mathematica
    f[n_] := Block[{k = 1}, While[k! < n^k, k++ ]; k]; Table[ f[n], {n, 62}] (* Robert G. Wilson v, Jun 12 2004 *)
  • PARI
    a(n)=if(n<2,1,k=1; while(k!
    				

Formula

a(n) = e*n + O(log(n)); a(n+1)-a(n) = 2 or 3.
Conjecture: for n>3 a(n) = round(e*n-(1/2)*log(2*Pi*n)-1/n). - Benoit Cloitre, Dec 14 2005
Above conjecture is false: For n = 195 we have: a(n) = 526 < 527 = round(exp(1)*n -(1/2)*log(2*Pi*n)-1/n). - Alois P. Heinz, Jan 15 2022

Extensions

Missing a(0)=1 inserted by Alois P. Heinz, Jan 15 2022

A230282 Largest k such that (k*n)! >= (k!)^(n+1).

Original entry on oeis.org

1, 1, 6, 64, 679, 8468, 126784, 2238565, 45605124, 1053117974, 27182818156, 775557529509, 24236473829015, 823299898542083, 30205566231626957, 1190319005015526817, 50143449209799256306, 2248672171655330927835
Offset: 0

Views

Author

Alex Ratushnyak, Oct 14 2013

Keywords

Examples

			Biggest k such that (3*k)! >= k!^4 is k = 64, so a(3) = 64.
a(10) = 27182818156 because k = 27182818156 satisfies the inequality (k*10)! >= (k!)^11, but k = 27182818157 does not. To verify this, note that taking the logarithm of each side of the inequality gives log((k*10)!) >= 11*log(k!), and use the series expression log(m!) = log(2*Pi*m)/2 + m*log(m) - m + (1/12)/m - (1/360)/m^3 + (1/1260)/m^5 - ... (where the numerators and denominators of the fractions 1/12, -1/360, 1/1260, etc., are from A046968 and A046969, respectively), to get, at k = 27182818156, log(271828181560!) = 6884982704601.26... for the left hand side of the inequality, and the slightly smaller result 11*log(27182818156!) = 6884982704600.83... for the right hand side; then repeat the calculations using k = 27182818157, and observe that this makes the right hand side slightly larger than the left hand side. - _Jon E. Schoenfield_, Oct 23 2013
		

Crossrefs

Programs

  • Mathematica
    Table[k = 0; While[(k n)! >= (k!)^(n + 1), k++]; k - 1, {n, 0, 4}] (* T. D. Noe, Oct 18 2013 *)
  • Python
    import math
    for n in range(8):
      for k in range(10000000):
        if math.factorial(n*k) < math.factorial(k)**(n+1):
          print(k-1, end=', ')
          break

Formula

For n > 1, a(n) = floor(e*(n^n) - ((n^2-1)*log(n) + n*(1+log(2*Pi)))/2) [conjectural, but verified for all n in 2..5000]. - Jon E. Schoenfield, Oct 22 2013

Extensions

a(7)-a(17) from Jon E. Schoenfield, Oct 22 2013

A309103 a(n) = Sum_{k >= 0} (-1)^k * floor(n^k / k!).

Original entry on oeis.org

1, 0, 0, 0, 0, -1, -1, -2, -1, -3, 0, 1, 0, -2, -1, -2, 2, 1, 1, 2, -2, 2, 0, -2, -3, 0, -1, -2, 0, -2, 3, -8, 1, -4, -3, -4, 1, -2, 1, -3, -2, -2, 2, 2, 3, 3, 2, 0, -5, -2, -3, -5, -2, -4, 3, 4, -2, -2, 4, -7, 3, 5, 3, 5, 0, -1, 1, -8, 6, -3, -1, 8, -5, 0, -6
Offset: 0

Views

Author

Rémy Sigrist, Jul 12 2019

Keywords

Comments

This sequence mimics the Maclaurin series for the function x -> exp(-x).
The series in the name is well defined; for any n > 0, only the first A065027(n) terms are different from zero.

Examples

			For n = 3:
- we have:
  k  floor(3^k / k!)
  -  ---------------
  0                1
  1                3
  2                4
  3                4
  4                3
  5                2
  6                1
  >=7              0
- hence a(3) = 1 - 3 + 4 - 4 + 3 - 2 + 1 = 0.
		

Crossrefs

See A309087 for similar sequences.
Cf. A065027.

Programs

  • PARI
    a(n) = { my (v=0, d=1, s=+1); for (k=1, oo, if (d<1, return (v), v += s*floor(d); d *= n/k; s = -s)) }
Showing 1-7 of 7 results.