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.
%I A376056 #19 Mar 30 2025 06:31:52 %S A376056 2,7,71,6959,62255215,4736981006316791, %T A376056 26518805245879857416837904442871, %U A376056 811438882694890436523185183518581584358651922339197834228784351 %N A376056 Lexicographically earliest sequence of positive integers a(1), a(2), a(3), ... such that for any n > 0, S(n) = Sum_{k = 1..n} (2*k-1)/a(k) < 1. %C A376056 Theorem: Given any sequence of nonnegative integers b(1), b(2), b(3), ..., let a(1), a(2), a(3), ... be the lexicographically earliest sequence of positive integers such that for all n >= 1, S(n) = Sum_{k = 1..n} b(k)/a(k) < 1. Then S(n) = (e(n)-1)/e(n) for positive integers e(1), e(2), e(3), .... %C A376056 For the present sequence the e(k) are given in A376057. %F A376056 a(n+1) = (2*n+1)*A376057(n) + 1. %p A376056 # Given a sequence b(1), b(2), b(3), ... of nonnegative real numbers, this program computes the first M terms of the lexicographically earliest sequence of positive integers a(1), a(2), a(3), ... with the property that for any n > 0, S(n) = Sum_{k = 1..n} b(k)/a(k) < 1. %p A376056 # For the present sequence we set b(k) = 2*k - 1. %p A376056 b := Array(0..100,-1); a := Array(0..100,-1); S := Array(0..100,-1); d := Array(0..100,-1); %p A376056 for k from 1 to 100 do b[k]:=2*k-1; od: %p A376056 M:=8; %p A376056 S[0] := 0; d[0] := 1; %p A376056 for n from 1 to M do %p A376056 a[n] := floor(b[n]/d[n-1])+1; %p A376056 S[n] := S[n-1] + b[n]/a[n]; %p A376056 d[n] := 1 - S[n]; %p A376056 od: %p A376056 La:=[seq(a[n],n=1..M)]; # the present sequence %p A376056 Ls:=[seq(S[n],n=1..M)]; # the sums S(n) %p A376056 Lsn:=[seq(numer(S[n]),n=1..M)]; %p A376056 Lsd:=[seq(denom(S[n]),n=1..M)]; # A376057 %p A376056 Lsd-Lsn; # As a check, by the above theorem, this should (and does) produce the all-1's sequence %p A376056 # Some small changes to the program are needed if the starting sequence {b(n)} has offset 0, as for example in the case of the Fibonacci or Catalan numbers (see A376058-A376061). %Y A376056 Cf. A374663, A375516, A375531, A375532, A375781, A375522, A376048-A376055, A376057-A376061. %K A376056 nonn,base %O A376056 1,1 %A A376056 _N. J. A. Sloane_, Sep 14 2024