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.

A270746 (r,1)-greedy sequence, where r(k) = 2/e^k.

This page as a plain text file.
%I A270746 #13 Mar 06 2025 08:17:46
%S A270746 1,2,1,2,2,2,2,1,2,1,15,107,4536,9767531,119608113171152,
%T A270746 27706455600364135685442345886,
%U A270746 683882728856994887705617234665700899371621018916716222985
%N A270746 (r,1)-greedy sequence, where r(k) = 2/e^k.
%C A270746 Let x > 0, and let r = (r(k)) be a sequence of positive irrational numbers.  Let a(1) be the least positive integer m such that r(1)/m < x, and inductively let a(n) be the least positive integer m such that r(1)/a(1) + ... + r(n-1)/a(n-1) + r(n)/m < x.  The sequence (a(n)) is the (r,x)-greedy sequence.  We are interested in choices of r and x for which the series r(1)/a(1) + ... + r(n)/a(n) + ... converges to x.  See A270744 for a guide to related sequences.
%F A270746 a(n) = ceiling(r(n)/s(n)), where s(n) = 1 - r(1)/a(1) - r(2)/a(2) - ... - r(n-1)/a(n-1).
%F A270746 r(1)/a(1) + ... + r(n)/a(n) + ... = 1.
%e A270746 a(1) = ceiling(r(1)) = ceiling(2/e) = ceiling(0.735...) = 1;
%e A270746 a(2) = ceiling(r(2)/(1 - r(1)/1)) = 2;
%e A270746 a(3) = ceiling(r(3)/(1 - r(1)/1 - r(2)/2)) = 2.
%e A270746 The first 6 terms of the series r(1)/a(1) + ... + r(n)/a(n) + ... are 0.735..., 0.871..., 0.970..., 0.975..., 0.988..., 0.995...
%t A270746 $MaxExtraPrecision = Infinity; z = 19;
%t A270746 r[k_] := N[2/E^k, 1000]; f[x_, 0] = x;
%t A270746 n[x_, k_] := n[x, k] = Ceiling[r[k]/f[x, k - 1]]
%t A270746 f[x_, k_] := f[x, k] = f[x, k - 1] - r[k]/n[x, k]
%t A270746 x = 1; Table[n[x, k], {k, 1, z}]
%t A270746 N[Sum[r[k]/n[x, k], {k, 1, 19}], 200]
%Y A270746 Cf. A001620, A270744, A068985.
%K A270746 nonn,easy
%O A270746 1,2
%A A270746 _Clark Kimberling_, Apr 09 2016