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.

A245800 a(n) is the least number k such that Sum_{j=S(n)+1..S(n)+k} 1/j >= 1/2, where S(n) = Sum_{i=1..n-1} a(i) and S(1) = 0.

This page as a plain text file.
%I A245800 #61 May 22 2025 10:21:39
%S A245800 1,1,2,3,5,9,14,24,39,64,106,175,288,475,783,1291,2129,3510,5787,9541,
%T A245800 15730,25935,42759,70498,116232,191634,315951,520915,858844,1415994,
%U A245800 2334579,3849070,6346044,10462858,17250336,28440996,46891275,77310643,127463701,210152115,346482262
%N A245800 a(n) is the least number k such that Sum_{j=S(n)+1..S(n)+k} 1/j >= 1/2, where S(n) = Sum_{i=1..n-1} a(i) and S(1) = 0.
%C A245800 The limiting ratio of consecutive terms is sqrt(e) ~ 1.648721270700128.
%C A245800 Conjecture 1: If the summation threshold (which, for this sequence, is defined as 1/2) is set to any positive number R, then the limiting ratio of consecutive terms in the resulting sequence is e^R.
%C A245800 Conjecture 2: If the summation threshold is set to log(phi) = 0.4812118250..., then the Fibonacci sequence is generated.
%C A245800 Partition the harmonic series into the smallest-sized groups that sum to 1/2 or greater. You get 1, 1/2, 1/3 + 1/4, 1/5 + 1/6 + 1/7, 1/8 + 1/9 + 1/10 + 1/11 + 1/12, 1/13 + 1/14 + ... + 1/21, 1/22 + ... ; a(n) gives the number of terms in the n-th group. - _Derek Orr_, Nov 08 2014
%C A245800 A partition sums to exactly 1/2 for only n=2. - _Jon Perry_, Nov 09 2014
%e A245800 Start with 1/1; 1/1 >= 1/2, so a(1) = 1.
%e A245800 1/1 has been used, so start a new sum with 1/2; 1/2 >= 1/2, so a(2) = 1.
%e A245800 1/1 and 1/2 have been used, so start a new sum with 1/3; 1/3 + 1/4 >= 1/2, so a(3) = 2.
%e A245800 1/1 through 1/4 have been used, so start a new sum with 1/5; 1/5 + 1/6 + 1/7 >= 1/2, so a(4) = 3, etc.
%o A245800 (Python)
%o A245800 import math
%o A245800 total = 0
%o A245800 prev = 1
%o A245800 count = 0
%o A245800 for n in range(1, 10**7):
%o A245800     total = total + 1/n
%o A245800     count = count + 1
%o A245800     if (total >= 0.5):
%o A245800         print(count,end=', ')
%o A245800         prev = count
%o A245800         total = 0
%o A245800         count = 0
%o A245800  
%o A245800 print("\ndone")
%o A245800 print(math.sqrt(math.e))
%o A245800 # _Rob van den Tillaart_, Aug 22 2014 [Corrected by _Derek Orr_, Oct 16 2014]
%o A245800 (Python)
%o A245800 def a(n):
%o A245800   if n == 1:
%o A245800     return 1
%o A245800   tot,c,k = 0,0,0
%o A245800   for x in range(1,10**7):
%o A245800     tot += 1/x
%o A245800     if tot >= 0.5:
%o A245800       k += 1
%o A245800       tot = 0
%o A245800     if k == n-1:
%o A245800       c += 1
%o A245800     if k == n:
%o A245800       return c
%o A245800 n = 1
%o A245800 while n < 100:
%o A245800   print(a(n),end=', ')
%o A245800   n += 1
%o A245800 # _Derek Orr_, Oct 16 2014
%o A245800 (PARI) lista(nn) = {n = 1; while (n < nn, k = 1; while (sum(x=n, n+k-1, 1/x) < 1/2, k++); print1(k, ", "); n = n+k;);} \\ _Michel Marcus_, Sep 14 2014
%o A245800 (PARI) a(n)=if(n==1,return(1));p=sum(i=1,n-1,a(i));k=1;while(sum(x=p+1,p+k,1/x)<1/2,k++);k
%o A245800 n=1;while(n<100,print1(a(n),", ");n++) \\ _Derek Orr_, Oct 16 2014
%Y A245800 Cf. A226161.
%Y A245800 Cf. A019774, A002390.
%K A245800 nonn
%O A245800 1,3
%A A245800 _Rob van den Tillaart_, Aug 22 2014
%E A245800 Edited by _Derek Orr_, Nov 08 2014