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.

A139036 a(n) = the number of 1's in the continued fraction expansion of the n-th harmonic number, H(n) = Sum_{k=1 to n} 1/k.

This page as a plain text file.
%I A139036 #20 Sep 27 2024 01:57:21
%S A139036 1,1,2,0,2,0,2,3,5,3,1,4,6,2,3,8,8,5,8,4,10,8,8,8,7,12,9,10,13,9,8,5,
%T A139036 10,9,12,17,15,7,9,13,8,14,12,13,14,12,11,18,17,21,19,11,12,18,16,21,
%U A139036 33,28,19,14,20,31,19,17,21,21,16,28,23,19,18,27,40
%N A139036 a(n) = the number of 1's in the continued fraction expansion of the n-th harmonic number, H(n) = Sum_{k=1 to n} 1/k.
%H A139036 Jinyuan Wang, <a href="/A139036/b139036.txt">Table of n, a(n) for n = 1..1000</a>
%H A139036 Gonzalo Ciruelos, <a href="/A139036/a139036.py.txt">Python script that generates a(1)..a(n)</a>
%e A139036 The 7th harmonic number is 1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/7 = 363/140, which has the continued fraction representation 2 + 1/(1 + 1/(1 + 1/(2 + 1/(5 + 1/5)))) = [2;1,1,2,5,5]. There are exactly two 1's in the continued fraction representation, so a(7) = 2.
%t A139036 Table[Count[ContinuedFraction[HarmonicNumber[n]],1],{n,100}] (* _Harvey P. Dale_, Nov 24 2016 *)
%o A139036 (PARI) a(n) = #select(x->x==1, contfrac(sum(i=1, n, 1/i))); \\ _Jinyuan Wang_, Mar 01 2020
%Y A139036 Cf. A100398.
%K A139036 nonn
%O A139036 1,3
%A A139036 _Leroy Quet_, May 31 2008
%E A139036 a(10)-a(15) from _Gonzalo Ciruelos_, Aug 02 2013
%E A139036 Corrected and extended by _Harvey P. Dale_, Nov 24 2016