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.

Showing 1-3 of 3 results.

A295572 First differences of A081881.

Original entry on oeis.org

1, 2, 6, 16, 43, 117, 318, 865, 2351, 6391, 17372, 47222, 128363, 348927, 948482, 2578241, 7008386, 19050768, 51785356, 140767193, 382644902, 1040136684, 2827384648, 7685628310, 20891703776, 56789538739, 154369971201, 419621087576, 1140648377196, 3100603756393
Offset: 1

Views

Author

N. J. A. Sloane, Nov 30 2017, following a suggestion from Loren Booda

Keywords

Comments

See A081881 and A295571 for discussion.
If the harmonic series is divided into the longest possible consecutive groups so that the sum of each group is <= 1, then a(n) is the number of terms in the n-th group. - Pablo Hueso Merino, Feb 16 2020

Examples

			From _Pablo Hueso Merino_, Feb 16 2020: (Start)
a(1) = 1 because 1 <= 1, 1 is one term (if you added 1/2 the sum would be greater than 1).
a(2) = 2 because 1/2 + 1/3 = 0.8333... <= 1, 1/2 and 1/3 are two terms (if you added 1/4 the sum would be greater than one).
a(3) = 6 because 1/4 + 1/5 + 1/6 + 1/7 + 1/8 + 1/9 = 0.9956... <= 1, it is a sum of six terms. (End)
		

Crossrefs

Programs

  • Mathematica
    a[1]=1;
    a[n_]:= a[n]= Module[{sum = 0}, r = 1 + Sum[a[k], {k, n-1}];
       x = r;
       While[sum <= 1, sum += 1/x++];
       p = x-2;
       p -r +1];
    Table[a[n], {n, 10}] (* Pablo Hueso Merino, Feb 16 2020 *)

Formula

a(1) = 1, a(n) = (max(m) : Sum_{s=r..m} 1/s <= 1)-r+1, r = Sum_{k=1..n-1} a(k). - Pablo Hueso Merino, Feb 16 2020
a(n) ~ c * exp(n), where c = (exp(1)-1) * A300897 = 0.290142809280953235916025... - Vaclav Kotesovec, Apr 05 2020

Extensions

More terms from Jinyuan Wang, Feb 20 2020

A331030 Divide the terms of the harmonic series into groups sequentially so that the sum of each group is minimally greater than 1. a(n) is the number of terms in the n-th group.

Original entry on oeis.org

2, 5, 13, 36, 98, 266, 723, 1965, 5342, 14521, 39472, 107296, 291661, 792817, 2155100, 5858169, 15924154, 43286339, 117664468, 319845186, 869429357, 2363354022, 6424262292, 17462955450, 47469234471, 129034757473, 350752836478, 953445061679, 2591732385596
Offset: 1

Views

Author

Keywords

Comments

a(n) = A046171(n+1) through a(5), and grows similarly for n > 5.
Let b(n) = Sum_{j=1..n} a(n); then for n >= 2 it appears that b(n) = round((b(n-1) + 1/2)*e). Verified through n = 10000 (using the approximation Sum_{j=1..k} 1/j = log(k) + gamma + 1/(2*k) - 1/(12*k^2) + 1/(120*k^4) - 1/(252*k^6) + 1/(240*k^8) - ..., where gamma is the Euler-Mascheroni constant, A001620). Cf. A081881. - Jon E. Schoenfield, Jan 10 2020

Examples

			a(1)=2 because 1 + 1/2 = 1.5 > 1,
a(2)=5 because 1/3 + 1/4 + 1/5 + 1/6 + 1/7 = 1.0928... > 1,
etc.
		

Crossrefs

Programs

  • PARI
    lista(lim=oo)={my(s=0, p=0); for(i=1, lim, s+=1/i; if(s>1, print1(i-p, ", "); s=0; p=i))} \\ Andrew Howroyd, Jan 08 2020
  • Python
    x = 0.0
    y = 0.0
    z = 0.0
    for i in range(1,100000000000000000000000):
      y += 1
      x = x + 1/i
      z = z + 1/i
      if x > 1:
        print(y)
        y = 0
        x = 0
    

Formula

a(1)=2, a(n) = (min(p) : Sum_{s=r..p} 1/s > 1)-r+1, r=Sum_{k=1..n-1} a(k).

Extensions

a(25)-a(29) from Jon E. Schoenfield, Jan 10 2020

A339061 Least integer j such that H(k+j)>=n+1, where k is the least integer to satisfy H(k)>=n, and H(k) is the sum of the first k terms of the harmonic series.

Original entry on oeis.org

1, 3, 7, 20, 52, 144, 389, 1058, 2876, 7817, 21250, 57763, 157017, 426817, 1160207, 3153770, 8572836, 23303385, 63345169, 172190019, 468061001, 1272321714, 3458528995, 9401256521, 25555264765, 69466411833, 188829284972, 513291214021
Offset: 0

Views

Author

Matthew J. Bloomfield, Dec 21 2020

Keywords

Examples

			Define H(0)=0, H(k) = Sum_{i=1..k} 1/i for k=1,2,3,...
a(0)=1: To reach n+1 from n=0 requires 1 additional term of the harmonic partial sum: H(0+1) = H(0) + 1/1 = H(1) = 1.
a(1)=3: To reach n+1 from n=1 requires 3 additional terms of the harmonic partial sum: H(1+3) = H(1) + 1/(1+1) + 1/(1+2) + 1/(1+3) = H(4) = 2.08333....
a(2)=7: To reach n+1 from n=2 requires 7 additional terms of the harmonic partial sum: H(4+7) = H(4) + 1/(4+1) + 1/(4+2) + ... + 1/(4+6) + 1/(4+7) = H(11) = 3.01987....
a(3)=20: To reach n+1 from n=3 requires 20 additional terms of the harmonic partial sum: H(11+20) = H(11) + 1/(11+1) + 1/(11+2) + ... + 1/(11+19) + 1/(11+20) = H(31) = 4.02724....
		

Crossrefs

First differences of A004080.
Cf. A001113 (e), A001620 (gamma).
Cf. A001008/A002805 (harmonic numbers).
Some sequences in the same spirit as this: A331028, A002387, A004080.

Programs

  • R
    #set size of search space
    Max=10000000
    #initialize sequence to empty
    seq=vector(length=0)
    #initialize partial sum to 0
    partialsum=0
    k=1
    n=1
    for(i in 1:Max){
       partialsum=partialsum+1/i
       if(partialsum>=n){
          seq=c(seq, k)
          k=0
          n=n+1
       }
       k=k+1
    }
    #print sequence numbers below Max
    seq

Formula

a(n) ~ (e-1)*e^(n-gamma), where e is Euler's number and gamma is the Euler-Mascheroni constant.
Conjecture: a(n) = floor(1/2 + e^(n-gamma+1)) - floor(1/2 + e^(n-gamma)) for n > 1 where e is Euler's number and gamma is the Euler-Mascheroni constant. - Adam Hugill, Nov 06 2022
Showing 1-3 of 3 results.