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.

A362006 a(n) is the minimum integer m such that floor(e^n) = floor(Sum_{k=0..m} (n^k)/(k!)).

Original entry on oeis.org

0, 1, 4, 8, 9, 12, 15, 17, 19, 24, 25, 29, 30, 34, 37, 39, 41, 44, 48, 49, 52, 55, 59, 61, 62, 66, 68, 70, 74, 79, 79, 82, 84, 89, 89, 92, 96, 98, 102, 103, 106, 110, 112, 114, 116, 122, 124, 126, 128, 132, 133, 137, 138, 141, 144, 147, 151, 152, 154, 158, 161
Offset: 0

Views

Author

Luca Onnis, Apr 03 2023

Keywords

Comments

Conjecture: a(n) ~ e*n as n->infinity.
Conjecture: a(n) <= 3n for all n.
The second one would imply: A000149(n) = floor(Sum_{k=0..3n} (n^k)/(k!)).

Examples

			a(3) = 8 since floor(e^3) = 20, floor(Sum_{k=0..8} (n^k)/(k!)) = 20 and "8" is the minimum because floor(Sum_{k=0..7} (n^k)/(k!)) = 19.
		

Crossrefs

Cf. A000149.

Programs

  • Mathematica
    f[n_, m_] := Floor[Sum[(n^k)/(k!), {k, 0, m}]] - Floor[E^n];
    a[n_] := Min[Flatten[Position[Table[f[n, m], {m, 0, 150}], 0]]] - 1;
    Table[a[n], {n, 1, 50}]
  • PARI
    a(n) = my(m=0, x=floor(exp(n)), y=1); while(floor(y) != x, m++; y += n^m/m!); m; \\ Michel Marcus, Apr 14 2023