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

A317844 Difference between A294898 and its Möbius transform (A297114).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 3, 2, 0, 0, 1, 0, 0, 3, 7, 0, -6, 2, 9, 3, 1, 0, -2, 0, 0, 7, 14, 5, -9, 0, 15, 9, -4, 0, 3, 0, 5, 5, 18, 0, -14, 3, 14, 14, 7, 0, 2, 9, -3, 15, 24, 0, -24, 0, 25, 10, 0, 11, 12, 0, 12, 18, 15, 0, -29, 0, 33, 16, 13, 10, 14, 0, -12, 10, 37, 0, -23, 16, 38, 24, 1, 0, -16, 12, 16, 25
Offset: 1

Views

Author

Antti Karttunen, Aug 09 2018

Keywords

Crossrefs

Programs

  • PARI
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A317844(n) = -sumdiv(n,d,(dA005187(d)-sigma(d)));

Formula

a(n) = -Sum_{d|n, dA008683(n/d)*A294898(d).
a(n) = A294898(n) - A297114(n).
a(n) = A300244(n) - A001065(n).

A324397 a(1) = 0; for n > 1, a(n) = A297114(A156552(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 3, -2, 3, 0, 7, 0, 14, -2, 0, 0, 9, 0, 15, -6, 9, 0, 18, -4, 33, -2, 14, 0, 4, 0, 25, -2, 42, -4, 7, 0, 254, -26, 9, 0, 33, 0, 63, -2, 140, 0, 41, -8, 14, -34, 127, 0, 24, -12, 66, -90, 579, 0, 38, 0, 684, -2, 6, -4, 21, 0, 175, -2, 37, 0, 24, 0, 3587, -2, 304, -8, 85, 0, 73, -14, 2733, 0, 6, -52, 8707, -378, 11, 0, 3
Offset: 1

Views

Author

Antti Karttunen, Mar 05 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Array[If[# == 1, 0, Function[n, DivisorSum[n, MoebiusMu[n/#] (2 # - DigitCount[2 #, 2, 1] - DivisorSigma[1, #]) &]]@ Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ #]]] &, 90] (* Michael De Vlieger, Mar 11 2019 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    \\ Slow: A297114(n) = sumdiv(n,d,moebius(n/d)*(A005187(d)-sigma(d)));
    A297111(n) = sumdiv(n,d,moebius(n/d)*A005187(d));
    A297114(n) = (A297111(n) - n);
    A324397(n) = if(1==n,0,A297114(A156552(n)));

Formula

a(1) = 0; for n > 1, a(n) = A297114(A156552(n)).
For all n >= 1, a(2n-1) = A324103(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

A294898 Deficiency minus binary weight: a(n) = A033879(n) - A000120(n) = A005187(n) - A000203(n).

Original entry on oeis.org

0, 0, 0, 0, 2, -2, 3, 0, 3, 0, 7, -6, 9, 1, 2, 0, 14, -5, 15, -4, 7, 5, 18, -14, 16, 7, 10, -3, 24, -16, 25, 0, 16, 12, 19, -21, 33, 13, 18, -12, 37, -15, 38, 1, 8, 16, 41, -30, 38, 4, 26, 3, 48, -16, 33, -11, 30, 22, 53, -52, 55, 23, 16, 0, 44, -14, 63, 8, 39, -7, 66, -53, 69, 31, 22, 9, 54, -16, 73, -28, 38, 35, 78, -59, 58
Offset: 1

Views

Author

Antti Karttunen, Nov 25 2017

Keywords

Comments

"Least deficient numbers" or "almost perfect numbers" are those k for which A033879(k) = 1, or equally, for which a(k) = -A048881(k-1). The only known solutions are powers of 2 (A000079), all present also in A295296. See also A235796 and A378988. - Antti Karttunen, Dec 16 2024

Crossrefs

Cf. A000120, A000203, A001065, A005187, A011371, A013661, A033879, A048881, A235796, A294896, A294899, A297114 (Möbius transform), A317844 (difference from a(n)), A326133, A326138, A324348 (a(n) applied to Doudna sequence), A379008 (a(n) applied to prime shift array), A378988.
Cf. A295296 (positions of zeros), A295297 (parity of a(n)).

Programs

Formula

a(n) = A005187(n) - A000203(n).
a(n) = A011371(n) - A001065(n).
a(n) = A033879(n) - A000120(n).
Sum_{k=1..n} a(k) ~ c * n^2, where c = 1 - zeta(2)/2 = 0.177532... . - Amiram Eldar, Feb 22 2024

Extensions

Name edited by Antti Karttunen, Dec 16 2024

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)

A297115 Möbius transform of A000120, binary weight of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 26 2017

Keywords

Crossrefs

Cf. A000120, A008683, A083254, A297114, A297116 (odd bisection), A297117.

Programs

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

Formula

a(n) = Sum_{d|n} A008683(n/d)*A000120(d).
a(n) = A083254(n) - A297114(n).
a(2n) = 0.

A300244 Difference between A005187 and its Möbius transform (A297111).

Original entry on oeis.org

0, 1, 1, 3, 1, 6, 1, 7, 4, 10, 1, 14, 1, 13, 11, 15, 1, 22, 1, 22, 14, 21, 1, 30, 8, 25, 16, 29, 1, 40, 1, 31, 22, 34, 18, 46, 1, 37, 26, 46, 1, 57, 1, 45, 38, 44, 1, 62, 11, 57, 35, 53, 1, 68, 26, 61, 38, 56, 1, 84, 1, 59, 51, 63, 30, 90, 1, 70, 45, 89, 1, 94, 1, 73, 65, 77, 29, 104, 1, 94, 50, 81, 1, 117, 39, 84, 57, 93, 1, 128, 33, 92, 60, 91, 42
Offset: 1

Views

Author

Antti Karttunen, Mar 10 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[IntegerExponent[(2 n)!, 2] - DivisorSum[n, IntegerExponent[(2 #)!, 2] MoebiusMu[n/#] &], {n, 95}] (* or *)
    Fold[Function[{a, n}, Append[a, {Abs@ Total@ Map[MoebiusMu[n/#] a[[#, -1]] &, Most@ Divisors@ n], IntegerExponent[(2 n)!, 2]}]], {{0, 1}}, Range[2, 95]][[All, 1]] (* Michael De Vlieger, Mar 10 2018 *)
  • PARI
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A300244(n) = -sumdiv(n,d,(dA005187(d));

Formula

a(n) = A005187(n) - A297111(n).
a(n) = -Sum_{d|n, dA008683(n/d)*A005187(d).

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).

A378986 a(n) = 2*phi(2*n) - 2*n, where phi is Euler totient function.

Original entry on oeis.org

0, 0, -2, 0, -2, -4, -2, 0, -6, -4, -2, -8, -2, -4, -14, 0, -2, -12, -2, -8, -18, -4, -2, -16, -10, -4, -18, -8, -2, -28, -2, 0, -26, -4, -22, -24, -2, -4, -30, -16, -2, -36, -2, -8, -42, -4, -2, -32, -14, -20, -38, -8, -2, -36, -30, -16, -42, -4, -2, -56, -2, -4, -54, 0, -34, -52, -2, -8, -50, -44, -2, -48, -2, -4
Offset: 1

Views

Author

Antti Karttunen, Dec 14 2024

Keywords

Crossrefs

Even bisection of A083254, and of A297114.
First row of A379011.
Cf. also A378987.

Programs

  • PARI
    A378986(n) = (2*eulerphi(2*n)-(2*n));

Formula

a(n) = 2*A000010(2*n) - 2*n.
a(n) = A083254(2*n) = A297114(2*n).
a(n) = -2*A176095(n).
a(n) = Sum_{d|2n} A008683(d)*A033879(2*n/d).

A318448 a(n) = Sum_{d|n} A294898(d), where A294898(d) = A005187(d) - sigma(d).

Original entry on oeis.org

0, 0, 0, 0, 2, -2, 3, 0, 3, 2, 7, -8, 9, 4, 4, 0, 14, -4, 15, -2, 10, 12, 18, -22, 18, 16, 13, 1, 24, -14, 25, 0, 23, 26, 24, -31, 33, 28, 27, -14, 37, -6, 38, 13, 15, 34, 41, -52, 41, 22, 40, 19, 48, -10, 42, -10, 45, 46, 53, -76, 55, 48, 29, 0, 55, 12, 63, 34, 57, 18, 66, -98, 69, 64, 42, 37, 64, 16, 73, -42, 51, 72, 78, -74, 74, 74, 73, 6
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2018

Keywords

Comments

Inverse Möbius transform of A294898.

Crossrefs

Programs

Formula

a(n) = Sum_{d|n} A294898(d).
a(n) = A318447(n) + A294898(n).
a(n) = A318446(n) - A007429(n).
a(n) = A296075(n) - A093653(n).
Showing 1-10 of 10 results.