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.

A292524 Interpret the values of the Moebius function mu(k) for k = 1 to n as a balanced ternary number.

Original entry on oeis.org

0, 1, 2, 5, 15, 44, 133, 398, 1194, 3582, 10747, 32240, 96720, 290159, 870478, 2611435, 7834305, 23502914, 70508742, 211526225, 634578675, 1903736026, 5711208079, 17133624236, 51400872708, 154202618124, 462607854373, 1387823563119, 4163470689357
Offset: 0

Views

Author

Alonso del Arte, Sep 18 2017

Keywords

Comments

Balanced ternary is much like regular ternary, but with the crucial difference of using the digit -1 instead of the digit 2. Then some powers of 3 are added, others are subtracted.
If mu(n) = 0, then a(n) is a multiple of 3, specifically, it is thrice a(n - 1). Otherwise, a(n) is not a multiple of 3.

Examples

			mu(1) = 1, so a(1) = 1 * 3^0 = 1.
mu(2) = -1, so a(2) = 1 * 3^1 + -1 * 3^0 = 3 - 1 = 2.
mu(3) = -1, so a(3) = 1 * 3^2 + -1 * 3^1 + -1 * 3^0 = 9 - 3 - 1 = 5.
mu(4) = 0, so a(4) = 1 * 3^3 + -1 * 3^2 + -1 * 3^1 + 0 * 3^0 = 27 - 9 - 3 + 0 = 15.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0,
          a(n-1)*3+numtheory[mobius](n))
        end:
    seq(a(n), n=0..33);  # Alois P. Heinz, Oct 13 2017
  • Mathematica
    Table[Plus@@(3^Range[n - 1, 0, -1] MoebiusMu[Range[n]]), {n, 50}]
  • PARI
    a(n) = sum(k=1, n, moebius(k)*3^(n-k)); \\ Michel Marcus, Oct 01 2017
    
  • PARI
    my(N=40, x='x+O('x^N)); concat(0, Vec(sum(k=1, N, moebius(k)*x^k)/(1-3*x))) \\ Seiichi Manyama, May 19 2021
    
  • PARI
    a(n) = if(n==0, 0, 3*a(n-1)+moebius(n)); \\ Seiichi Manyama, May 19 2021

Formula

a(n) = Sum_{k = 1..n} mu(k) 3^(n - k).
a(n) = 3 * a(n-1) + mu(n) for n > 0. - Alois P. Heinz, Oct 13 2017
a(n) ~ A238271 * 3^n. - Vaclav Kotesovec, May 19 2021

Extensions

a(0)=0 prepended by Alois P. Heinz, Oct 13 2017

A344432 a(n) = Sum_{k=1..n} mu(k) * 2^(n - k).

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 7, 13, 26, 52, 105, 209, 418, 835, 1671, 3343, 6686, 13371, 26742, 53483, 106966, 213933, 427867, 855733, 1711466, 3422932, 6845865, 13691730, 27383460, 54766919, 109533837, 219067673, 438135346, 876270693, 1752541387, 3505082775, 7010165550
Offset: 0

Views

Author

Seiichi Manyama, May 19 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[MoebiusMu[k] * 2^(n-k), {k,1,n}]; Array[a, 40] (* Amiram Eldar, May 19 2021 *)
  • PARI
    a(n) = sum(k=1, n, moebius(k)*2^(n-k));
    
  • PARI
    my(N=40, x='x+O('x^N)); concat(0, Vec(sum(k=1, N, moebius(k)*x^k)/(1-2*x)))
    
  • PARI
    a(n) = if(n==0, 0, 2*a(n-1)+moebius(n));

Formula

G.f.: (Sum_{k>=1} mu(k) * x^k) / (1 - 2*x).
a(n) = 2 * a(n-1) + mu(n) for n > 0.
a(n) ~ A238270 * 2^n. - Vaclav Kotesovec, May 19 2021

A343425 a(n) = Sum_{k=1..n} mu(k) * n^(n - k).

Original entry on oeis.org

1, 1, 5, 44, 474, 6259, 98398, 1801784, 37726398, 889909001, 23363492888, 675898131588, 21367308429609, 732952005073611, 27116443849927291, 1076343749563379984, 45629840631648951966, 2057705657634136459302, 98357762859847238180913
Offset: 1

Views

Author

Seiichi Manyama, May 19 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[MoebiusMu[k] * n^(n-k), {k,1,n}]; Array[a, 20] (* Amiram Eldar, May 19 2021 *)
  • PARI
    a(n) = sum(k=1, n, moebius(k)*n^(n-k));
Showing 1-3 of 3 results.