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

A297116 Odd bisection of A297115, Möbius transform of A000120 (binary weight of n).

Original entry on oeis.org

1, 1, 1, 2, 0, 2, 2, 1, 1, 2, -1, 3, 1, 2, 3, 4, -2, -1, 2, 0, 2, 3, 0, 4, 0, 1, 3, 1, 0, 4, 4, 3, -2, 2, -2, 3, 2, -1, -1, 4, -1, 3, 1, 0, 3, 0, -1, 2, 2, 2, 3, 4, 0, 4, 4, 2, 3, 0, 1, 2, 2, 2, 3, 6, -3, 2, -2, -2, 2, 3, -2, 0, -2, 1, 3, 4, 0, -1, 4, 1, -3, 3, -1, 4, 1, 1, 4, 2, -2, 4, 4, 0, 1, 2, -2, 6, 2, 0, 3, 4, 0, -1, 1, 3, -1
Offset: 1

Views

Author

Antti Karttunen, Dec 26 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A297115(2n - 1).

A083254 a(n) = 2*phi(n) - n.

Original entry on oeis.org

1, 0, 1, 0, 3, -2, 5, 0, 3, -2, 9, -4, 11, -2, 1, 0, 15, -6, 17, -4, 3, -2, 21, -8, 15, -2, 9, -4, 27, -14, 29, 0, 7, -2, 13, -12, 35, -2, 9, -8, 39, -18, 41, -4, 3, -2, 45, -16, 35, -10, 13, -4, 51, -18, 25, -8, 15, -2, 57, -28, 59, -2, 9, 0, 31, -26, 65, -4, 19, -22, 69, -24, 71, -2, 5, -4, 43, -30, 77, -16, 27, -2, 81, -36, 43, -2, 25
Offset: 1

Views

Author

Labos Elemer, May 08 2003

Keywords

Comments

Möbius transform of A033879, deficiency of n. - Antti Karttunen, Dec 26 2017

Examples

			Case 1# - totient(x)-cototient[x] = 0 if x is a power of 2;
Case 2# - totient(x)>cototient[x] gives odd primes and also A067800, (= A014076 except probably A036798); e.g. n = 33: a(33) = 2.20-33 = 7; n = p prime: a(p) = p-2;
Case 3# - totient(x)<cototient[x] gives even numbers without powers of 2 and most probably A036798; e.g. n = 20: a(20) = -4; n = 105: a(105) = 2.48-105 = 96-105 = -9.
		

Crossrefs

Programs

Formula

a(n) = totient(n) - cototient(n) = A000010(n) - A051953(n).
From Antti Karttunen, Dec 26 2017: (Start)
a(n) = A065620(A297153(n)) = A117966(A297154(n)).
a(n) = A297114(n) + A297115(n).
a(2n) = A297114(2n).
For all n >= 1, -a(A000010(n)) = A293516(n).
(End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = 6/Pi^2 - 1/2 = 0.107927... . - Amiram Eldar, Sep 07 2023

A297111 Möbius transform of A005187, where A005187(n) = 2n - (number of 1's in binary representation of n).

Original entry on oeis.org

1, 2, 3, 4, 7, 4, 10, 8, 12, 8, 18, 8, 22, 12, 15, 16, 31, 12, 34, 16, 25, 20, 41, 16, 39, 24, 34, 24, 53, 16, 56, 32, 42, 32, 49, 24, 70, 36, 48, 32, 78, 24, 81, 40, 48, 44, 88, 32, 84, 40, 63, 48, 101, 36, 79, 48, 72, 56, 112, 32, 116, 60, 69, 64, 98, 40, 130, 64, 90, 48, 137, 48, 142, 72, 81, 72, 121, 48, 152, 64
Offset: 1

Views

Author

Antti Karttunen, Dec 25 2017

Keywords

Comments

Sequence differs from A035532 for the first time at n = 15, 21, 25, 27, 33, 35, 51, etc., i.e., at those composite n where A297115 has a nonzero value. - Antti Karttunen & M. F. Hasler, Mar 10 2018

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, IntegerExponent[(2 #)!, 2] MoebiusMu[n/#] &], {n, 80}] (* Michael De Vlieger, Mar 10 2018 *)
  • PARI
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A297111(n) = sumdiv(n,d,moebius(n/d)*A005187(d));

Formula

a(n) = Sum_{d|n} A005187(d)*A008683(n/d).
a(n) = n + A297114(n).
From Antti Karttunen, Mar 11 2018: (Start)
Sum A005187(n) x^n = Sum a(n)*x^n/(1-x^n). [Another way of saying that this is the Möbius transform of A005187. This was originally included in A035532 by mistake.]
a(n) = 2*phi(n) - A297115(n) = phi(n) + A297117(n).
a(n) = A005187(n) - A300244(n).
a(1) = 1; for n > 1, a(n) = A300723(n) + 2*A300724(n).
(End)

A297114 Möbius transform of A294898, where A294898 is deficiency minus binary weight.

Original entry on oeis.org

0, 0, 0, 0, 2, -2, 3, 0, 3, -2, 7, -4, 9, -2, 0, 0, 14, -6, 15, -4, 4, -2, 18, -8, 14, -2, 7, -4, 24, -14, 25, 0, 9, -2, 14, -12, 33, -2, 9, -8, 37, -18, 38, -4, 3, -2, 41, -16, 35, -10, 12, -4, 48, -18, 24, -8, 15, -2, 53, -28, 55, -2, 6, 0, 33, -26, 63, -4, 21, -22, 66, -24, 69, -2, 6, -4, 44, -30, 73, -16, 28, -2
Offset: 1

Views

Author

Antti Karttunen, Dec 26 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, MoebiusMu[n/#] (2 # - DigitCount[2 #, 2, 1] - DivisorSigma[1, #]) &], {n, 82}] (* Michael De Vlieger, Mar 11 2019 *)
  • PARI
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A297114(n) = sumdiv(n,d,moebius(n/d)*(A005187(d)-sigma(d)));

Formula

a(n) = Sum_{d|n} A008683(n/d)*A294898(d).
a(n) = A297111(n) - n.
a(n) = A297117(n) - A051953(n).
a(n) = A083254(n) - A297115(n).
a(2n) = A083254(2n) = A378986(n) = -2*A176095(n).
a(n) = A294898(n) - A317844(n).

A297117 Möbius transform of A011371, n minus (number of 1's in binary expansion of n).

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 4, 4, 6, 4, 8, 4, 10, 6, 7, 8, 15, 6, 16, 8, 13, 10, 19, 8, 19, 12, 16, 12, 25, 8, 26, 16, 22, 16, 25, 12, 34, 18, 24, 16, 38, 12, 39, 20, 24, 22, 42, 16, 42, 20, 31, 24, 49, 18, 39, 24, 36, 28, 54, 16, 56, 30, 33, 32, 50, 20, 64, 32, 46, 24, 67, 24, 70, 36, 41, 36, 61, 24, 74, 32, 55, 40, 79, 24
Offset: 1

Views

Author

Antti Karttunen, Dec 26 2017

Keywords

Crossrefs

Programs

  • PARI
    A297117(n) = sumdiv(n,d,moebius(n/d)*(d-hammingweight(d)));

Formula

a(n) = Sum_{d|n} A008683(n/d) * (d - A000120(d)).
a(n) = A297111(n) - A000010(n).
a(n) = A297114(n) + A051953(n).

A300724 Möbius transform of A053644(n), largest power of 2 less than or equal to n.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 3, 4, 6, 3, 7, 2, 7, 3, 3, 8, 15, 6, 15, 6, 11, 7, 15, 4, 12, 7, 8, 6, 15, 3, 15, 16, 23, 15, 25, 12, 31, 15, 23, 12, 31, 11, 31, 14, 18, 15, 31, 8, 28, 12, 15, 14, 31, 8, 21, 12, 15, 15, 31, 6, 31, 15, 10, 32, 53, 23, 63, 30, 47, 25, 63, 24, 63, 31, 44, 30, 53, 23, 63, 24, 48, 31, 63, 22, 45, 31, 47, 28, 63, 18, 53, 30, 47, 31
Offset: 1

Views

Author

Antti Karttunen, Mar 11 2018

Keywords

Crossrefs

Programs

Formula

a(n) = Sum_{d|n} A008683(n/d)*A053644(d).
a(n) + A300725(n) = A000010(n).

A300725 Möbius transform of A053645(n), distance to the largest power of 2 less than or equal to n.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 3, 0, 0, 1, 3, 2, 5, 3, 5, 0, 1, 0, 3, 2, 1, 3, 7, 4, 8, 5, 10, 6, 13, 5, 15, 0, -3, 1, -1, 0, 5, 3, 1, 4, 9, 1, 11, 6, 6, 7, 15, 8, 14, 8, 17, 10, 21, 10, 19, 12, 21, 13, 27, 10, 29, 15, 26, 0, -5, -3, 3, 2, -3, -1, 7, 0, 9, 5, -4, 6, 7, 1, 15, 8, 6, 9, 19, 2, 19, 11, 9, 12, 25, 6, 19, 14, 13, 15, 27
Offset: 1

Views

Author

Antti Karttunen, Mar 11 2018

Keywords

Crossrefs

Programs

  • Mathematica
    With[{s = Array[# - 2^Floor@ Log2@ # &, 95]}, Table[DivisorSum[n, MoebiusMu[n/#] s[[#]] &], {n, Length@ s}]] (* Michael De Vlieger, Mar 13 2018 *)
  • PARI
    A053644(n) = { my(k=1); while(k<=n, k<<=1); (k>>1); }; \\ From A053644
    A053645(n) = (n-A053644(n));
    A300725(n) = sumdiv(n,d,moebius(n/d)*A053645(d));

Formula

a(n) = Sum_{d|n} A008683(n/d)*A053645(d).
a(n) + A300724(n) = A000010(n).

A378989 Dirichlet inverse of the Möbius transform of binary weight of n.

Original entry on oeis.org

1, 0, -1, 0, -1, 0, -2, 0, 1, 0, -2, 0, -2, 0, 1, 0, -1, 0, -2, 0, 5, 0, -3, 0, 0, 0, -3, 0, -3, 0, -4, 0, 6, 0, 5, 0, -2, 0, 4, 0, -2, 0, -3, 0, -1, 0, -4, 0, 4, 0, 1, 0, -3, 0, 3, 0, 4, 0, -4, 0, -4, 0, -11, 0, 6, 0, -2, 0, 8, 0, -3, 0, -2, 0, 2, 0, 9, 0, -4, 0, 6, 0, -3, 0, 1, 0, 6, 0, -3, 0, 8, 0, 9, 0, 2, 0, -2, 0, -12, 0, -3, 0, -4, 0, -12
Offset: 1

Views

Author

Antti Karttunen, Dec 15 2024

Keywords

Crossrefs

Dirichlet inverse of A297115.
Inverse Möbius transform of A378990.
Cf. A000120.

Programs

  • PARI
    A297115(n) = sumdiv(n, d, moebius(n/d)*hammingweight(d));
    memoA378989 = Map();
    A378989(n) = if(1==n,1,my(v); if(mapisdefined(memoA378989,n,&v), v, v = -sumdiv(n,d,if(dA297115(n/d)*A378989(d),0)); mapput(memoA378989,n,v); (v)));

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA297115(n/d) * a(d).
a(n) = Sum_{d|n} A378990(d).

A035532 a(n) = 2*phi(n) if n composite, or 2*phi(n) - (A000120(n)-1) if n prime, where phi = A000010, Euler's totient function, and a(1) = 1.

Original entry on oeis.org

1, 2, 3, 4, 7, 4, 10, 8, 12, 8, 18, 8, 22, 12, 16, 16, 31, 12, 34, 16, 24, 20, 41, 16, 40, 24, 36, 24, 53, 16, 56, 32, 40, 32, 48, 24, 70, 36, 48, 32, 78, 24, 81, 40, 48, 44, 88, 32, 84, 40, 64, 48, 101, 36, 80, 48, 72, 56, 112, 32, 116, 60, 72, 64, 96, 40, 130, 64, 88, 48, 137
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a035532 1 = 1
    a035532 n = if a010051' n == 0 then phi2 else phi2 - a000120 n + 1
                where phi2 = 2 * a000010 n
    -- Reinhard Zumkeller, Feb 04 2015
    
  • Mathematica
    Insert[Table[If[PrimeQ[n],2*EulerPhi[n] - DigitCount[n, 2][[1]] + 1, 2*EulerPhi[n]], {n, 2, 100}], 1, 1] (* Stefan Steinerberger, Apr 11 2006 *)
  • PARI
    A035532(n)=2*eulerphi(n)-if(isprime(n),hammingweight(n)-1,n==1) \\ M. F. Hasler, Mar 10 2018

Formula

a(n) = 2*A000010(n) - A010051(n)*A048881(n-1), for n > 1. - Reinhard Zumkeller, Feb 04 2015, edited by M. F. Hasler, Mar 10 2018
For many values of n, the inverse Möbius transform of this sequence (g.f.: Sum a(n)*x^n/(1-x^n)) equals A005187, but this is not the case for composite n such that A297115(n) <> 0. The equality does hold for A297111 instead. - Antti Karttunen & M. F. Hasler, Mar 10 2018

Extensions

More terms from James Sellers
Definition amended for a(1) = 1 by M. F. Hasler, Mar 10 2018
Showing 1-9 of 9 results.