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.

A138705 a(n) is the number of terms in the continued fraction of the absolute value of B_{2n}, the (2n)-th Bernoulli number.

This page as a plain text file.
%I A138705 #22 Apr 14 2023 10:53:44
%S A138705 1,2,2,2,2,3,6,2,7,7,4,4,6,2,6,7,7,2,10,2,8,2,3,5,10,3,7,7,6,6,17,2,7,
%T A138705 10,2,7,23,2,2,5,18,5,16,2,10,14,6,2,18,2,9,5,7,6,18,4,15,2,6,2,17,2,
%U A138705 2,15,7,9,12,2,8,11,12,2,21,2,6,14,2,4,23,2
%N A138705 a(n) is the number of terms in the continued fraction of the absolute value of B_{2n}, the (2n)-th Bernoulli number.
%C A138705 The continued fraction terms being counted include the initial 0, if there is one.
%H A138705 Vaclav Kotesovec, <a href="/A138705/b138705.txt">Table of n, a(n) for n = 0..10000</a>
%e A138705 The 12th Bernoulli number is -691/2730. Now 691/2730 has the continued fraction 0 + 1/(3 + 1/(1 + 1/(19 + 1/(3 + 1/11)))), which has 6 terms (including the zero). So a(6) = 6.
%t A138705 Table[Length[ContinuedFraction[Abs[BernoulliB[2*n]]]], {n, 0, 100}] (* _Vaclav Kotesovec_, Oct 03 2019 *)
%o A138705 (PARI) a(n) = #contfrac(abs(bernfrac(2*n))); \\ _Jinyuan Wang_, Aug 07 2021
%o A138705 (Python)
%o A138705 from sympy import continued_fraction, bernoulli
%o A138705 def A138705(n): return len(continued_fraction(abs(bernoulli(n<<1)))) # _Chai Wah Wu_, Apr 14 2023
%Y A138705 Cf. A027641/A027642, A138704, A138706.
%K A138705 nonn
%O A138705 0,2
%A A138705 _Leroy Quet_, Mar 26 2008
%E A138705 a(8)-a(70) from _Lars Blomberg_, Mar 16 2012