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.

A300222 In ternary (base-3) representation of n, replace 1's with 0's.

Original entry on oeis.org

0, 0, 2, 0, 0, 2, 6, 6, 8, 0, 0, 2, 0, 0, 2, 6, 6, 8, 18, 18, 20, 18, 18, 20, 24, 24, 26, 0, 0, 2, 0, 0, 2, 6, 6, 8, 0, 0, 2, 0, 0, 2, 6, 6, 8, 18, 18, 20, 18, 18, 20, 24, 24, 26, 54, 54, 56, 54, 54, 56, 60, 60, 62, 54, 54, 56, 54, 54, 56, 60, 60, 62, 72, 72, 74, 72, 72, 74, 78, 78, 80, 0, 0, 2, 0, 0, 2, 6, 6, 8, 0, 0, 2
Offset: 0

Views

Author

Antti Karttunen, Mar 14 2018

Keywords

Examples

			For n=46, which in base-3 (A007089) is 1201, replacing 1's with 0's gives 200, and as that is base-3 representation of 18 (= 2*(3^2) + 0*(3^1) + 0*(3^0)), a(46) = 18.
		

Crossrefs

Cf. A300822 (Moebius transform).

Programs

  • Mathematica
    Array[FromDigits[IntegerDigits[#, 3] /. 1 -> 0, 3] &, 93, 0] (* Michael De Vlieger, Mar 17 2018 *)
  • PARI
    A244042(n) = fromdigits(apply(x->(x%2), digits(n, 3)), 3);
    A300222(n) = (n - A244042(n));
    \\ Or directly as:
    A300222(n) = fromdigits(apply(x->(if (1==x, 0, x)), digits(n, 3)), 3);

Formula

a(n) = n - A244042(n) = 2*A244042(A004488(n)).
a(n) = 2*A005836(1+A289814(n)). [With the current starting offset 1 of A005836.]
a(n) = A300822(n) + A300824(n).

A300824 Difference between A300222(n) and its Möbius transform.

Original entry on oeis.org

0, 0, 0, 2, 0, 2, 0, 0, 0, 4, 0, 4, 0, 8, 2, 8, 0, 6, 0, -2, 6, 4, 0, 8, 2, 2, 0, 0, 0, 8, 0, 6, 2, 10, 8, 12, 0, 20, 0, 28, 0, 18, 0, 16, 6, 22, 0, 22, 6, 22, 8, 24, 0, 18, 4, 8, 18, 4, 0, 16, 0, 2, 18, 2, 2, 26, 0, 4, 20, 0, 0, 24, 0, 2, 28, 0, 8, 30, 0, -2, 0, 4, 0, 0, 10, 8, 2, 16, 0, 24, 6, 16, 0, 22, 20, 14, 0, 14, 6, 40, 0, 26, 0, 32, 24
Offset: 1

Views

Author

Antti Karttunen, Mar 14 2018

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := FromDigits[IntegerDigits[n, 3] /. 1 -> 0, 3]; Table[f@ n - DivisorSum[n, MoebiusMu[n/#] f@ # &], {n, 105}] (* Michael De Vlieger, Mar 17 2018 *)
  • PARI
    A300222(n) = fromdigits(apply(x->(if (1==x, 0, x)), digits(n, 3)), 3);
    A300824(n) = -sumdiv(n,d,(dA300222(d));

Formula

a(n) = A300222(n) - A300822(n).
a(n) = -Sum_{d|n, dA008683(n/d)*A300222(d) = Sum_{d|n, dA300822(d).
a(n) = A051953(n) - A300823(n).

A300821 Möbius transform of A244042.

Original entry on oeis.org

1, -1, 2, 4, 2, -2, 0, -4, 6, 8, 8, 8, 12, 12, 4, 10, 8, -6, 0, -14, 0, -4, 2, -8, -2, -12, 18, 12, 26, 16, 30, 20, 16, 20, 24, 24, 36, 36, 24, 44, 38, 24, 36, 28, 12, 26, 26, 20, 30, 22, 16, 24, 26, -18, -10, -24, 0, -22, 2, -28, 0, -30, 0, -20, -6, -8, 12, -20, 4, -36, 8, -24, 0, -36, -4, -36, -6, -24, 0, -50, 54, 44, 80, 24
Offset: 1

Views

Author

Antti Karttunen, Mar 14 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, MoebiusMu[n/#] FromDigits[IntegerDigits[#, 3] /. 2 -> 0, 3] &], {n, 84}] (* Michael De Vlieger, Mar 17 2018 *)
  • PARI
    A244042(n) = fromdigits(apply(x->(x%2), digits(n, 3)), 3);
    A300821(n) = sumdiv(n,d,moebius(n/d)*A244042(d));

Formula

a(n) = Sum_{d|n} moebius(n/d)*A244042(d).
a(n) = A000010(n) - A300822(n).
a(n) = A244042(n) - A300823(n).
Showing 1-3 of 3 results.