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.

A247778 Least k such that e - (1 + 1/k)^k < 1/n.

This page as a plain text file.
%I A247778 #7 Sep 25 2014 21:15:48
%S A247778 1,2,4,5,6,8,9,10,12,13,15,16,17,19,20,21,23,24,25,27,28,29,31,32,34,
%T A247778 35,36,38,39,40,42,43,44,46,47,49,50,51,53,54,55,57,58,59,61,62,63,65,
%U A247778 66,68,69,70,72,73,74,76,77,78,80,81,82,84,85,87,88,89
%N A247778 Least k such that e - (1 + 1/k)^k < 1/n.
%C A247778 a(n+1) - a(n) is in {1,2} for n >= 1.
%H A247778 Clark Kimberling, <a href="/A247778/b247778.txt">Table of n, a(n) for n = 1..3000</a>
%e A247778 The values of e - (1 + 1/k)^k for k = 1..8 are approximately 0.718282, 0.468282, 0.347911, 0.276876, 0.229962, 0.196655, 0.171782, 0.152497, so that the first 6 terms of A247778 are 1,2,4,5,6,8.
%t A247778 z = 600; f[n_] := f[n] = Select[Range[z], E - (1 + 1/#)^# < 1/n &, 1];
%t A247778 u = Flatten[Table[f[n], {n, 1, z}]]       (*A247778*)
%t A247778 d1 = Flatten[Position[Differences[u], 1]] (*A247779*)
%t A247778 d2 = Flatten[Position[Differences[u], 2]] (*A247780*)
%o A247778 (PARI) a(n) = {k = 1; while ((exp(1) - (1 + 1/k)^k) >= 1/n, k++); k;} \\ _Michel Marcus_, Sep 25 2014
%Y A247778 Cf. A247779, A247780.
%K A247778 nonn,easy
%O A247778 1,2
%A A247778 _Clark Kimberling_, Sep 23 2014