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-2 of 2 results.

A092053 Denominators of the convergents of the continued fraction expansion [1;1/2,1/3,1/4,...,1/n,...].

Original entry on oeis.org

1, 1, 7, 19, 53, 81, 823, 5359, 12923, 21877, 102061, 354883, 808865, 1433689, 25699639, 369784999, 817787423, 1487830821, 6512750579, 23917578595, 51908057021, 96040578001, 827937066989, 6166467806391, 13211837015707
Offset: 1

Views

Author

Paul D. Hanna, Feb 19 2004

Keywords

Comments

Numerators of convergents are A001902 (successive denominators of Wallis's product approximation to Pi/2). Sum of numerators and denominators equals powers of 2: A001902(n) + a(n) = 2^A092054(n).

Crossrefs

Programs

  • Maple
    R:= gfun:-rectoproc({r(n) = (r(n - 1))/(n - 1) + r(n - 2), r(1) = 0, r(2) = 1}, r(n), remember):
    seq(numer(R(n)),n=2..30); # Robert Israel, May 14 2017
  • Mathematica
    Numerator[RecurrenceTable[{r[n] == (r[n - 1])/(n - 1) + r[n - 2], r[1] == 0, r[2] == 1}, r, {n, 2, 30}]] (* Terry D. Grant, May 07 2017, fixed by Vaclav Kotesovec, Aug 14 2021 *)
    Table[Numerator[ContinuedFractionK[1, 1/k , {k, 1, n}]], {n, 1, 30}] (* Vaclav Kotesovec, Aug 14 2021 *)
  • PARI
    a(n)=local(A);CF=contfracpnqn(vector(n,k,1/k));A=denominator(CF[1,1]/CF[2,1])

Formula

a(n) = 2^A092054(n) - A001902(n).

A378992 a(n) = A011371(n) - A048881(n); The exponent of the highest power of 2 dividing the n-th factorial minus the exponent of the highest power of 2 dividing n-th Catalan number.

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 2, 4, 6, 6, 6, 7, 8, 8, 8, 11, 14, 14, 14, 15, 16, 16, 16, 18, 20, 20, 20, 21, 22, 22, 22, 26, 30, 30, 30, 31, 32, 32, 32, 34, 36, 36, 36, 37, 38, 38, 38, 41, 44, 44, 44, 45, 46, 46, 46, 48, 50, 50, 50, 51, 52, 52, 52, 57, 62, 62, 62, 63, 64, 64, 64, 66, 68, 68, 68, 69, 70, 70, 70, 73, 76, 76, 76
Offset: 0

Views

Author

Antti Karttunen, Dec 16 2024

Keywords

Comments

Apparently, after the initial three 0's, only terms of A092054 occur, every other as a single copy, and every other in a batch of 3 duplicated terms.

Crossrefs

Programs

  • Mathematica
    A378992[n_] := n - DigitCount[n, 2, 1] - DigitCount[n + 1, 2, 1] + 1;
    Array[A378992, 100, 0] (* or *)
    MapIndexed[#2[[1]] - # &, Total[Partition[DigitCount[Range[0, 100], 2, 1], 2, 1], {2}]] (* Paolo Xausa, Dec 28 2024 *)
  • PARI
    A378992(n) = (1+(n-hammingweight(n)-hammingweight(1+n)));

Formula

a(n) = A007814(A000142(n)) - A007814(A000108(n)) = A011371(n) - A048881(n).
a(0) = 0; for n > 0, a(n) = A050605(n-1) + a(n-1), where A050605(n) = A007814(n+1)+A007814(n+2)-1.
Showing 1-2 of 2 results.