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.

Previous Showing 11-12 of 12 results.

A119920 Number of rationals in [0, 1) having exactly n preperiodic bits, then exactly n periodic bits.

Original entry on oeis.org

1, 4, 24, 96, 480, 1728, 8064, 30720, 129024, 506880, 2095104, 8232960, 33546240, 133152768, 536248320, 2139095040, 8589803520, 34285289472, 137438429184, 549212651520, 2198882746368, 8791793860608, 35184363700224
Offset: 1

Views

Author

Brad Chalfan (brad(AT)chalfan.net), May 28 2006

Keywords

Examples

			The binary expansion of 7/24 = 0.010(01)... has 3 preperiodic bits (to the right of the binary point) followed by 2 periodic (i.e., repeating) bits, while 1/2 = 0.1(0)... has one bit of each type. The preperiodic and periodic parts are both chosen to be as short as possible.
a(2) = |{1/12 = 0.00(01)..., 5/12 = 0.01(10)..., 7/12 = 0.10(01)..., 11/12 = 0.11(10)...}| = 4
		

Crossrefs

Elementwise product of 2^n (offset 0) and A038199. Also, diagonal of A119918.

Programs

  • Mathematica
    Table[2^(n-1)(Plus@@((2^Divisors[n]-1)MoebiusMu[n/Divisors[n]])),{n,1,23} ]

Formula

a(n) = 2^(n-1) * sum_{d|n} (2^d - 1) * mu(n/d)

A346558 a(n) = Sum_{d|n} phi(n/d) * (2^d - 1).

Original entry on oeis.org

1, 4, 9, 20, 35, 78, 133, 280, 531, 1070, 2057, 4212, 8203, 16534, 32865, 65840, 131087, 262818, 524305, 1049740, 2097459, 4196390, 8388629, 16782024, 33554575, 67117102, 134218809, 268452212, 536870939, 1073777010, 2147483677, 4295033440, 8589938775, 17180000318, 34359739085
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 17 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[EulerPhi[n/d] (2^d - 1), {d, Divisors[n]}], {n, 1, 35}]
    nmax = 35; CoefficientList[Series[Sum[EulerPhi[k] x^k/((1 - x^k) (1 - 2 x^k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
  • PARI
    a(n) = sumdiv(n, d, eulerphi(n/d)*(2^d - 1)); \\ Michel Marcus, Sep 17 2021

Formula

G.f.: Sum_{k>=1} phi(k) * x^k / ((1 - x^k) * (1 - 2*x^k)).
a(n) = Sum_{k=1..n} (2^gcd(n,k) - 1).
a(n) = n * (A000031(n) - 1) = n * A008965(n).
Dirichlet convolution of A000225 and A000010. - R. J. Mathar, Sep 30 2021
Previous Showing 11-12 of 12 results.