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

A051953 Cototient(n) := n - phi(n).

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 4, 3, 6, 1, 8, 1, 8, 7, 8, 1, 12, 1, 12, 9, 12, 1, 16, 5, 14, 9, 16, 1, 22, 1, 16, 13, 18, 11, 24, 1, 20, 15, 24, 1, 30, 1, 24, 21, 24, 1, 32, 7, 30, 19, 28, 1, 36, 15, 32, 21, 30, 1, 44, 1, 32, 27, 32, 17, 46, 1, 36, 25, 46, 1, 48, 1, 38, 35, 40, 17, 54, 1, 48, 27
Offset: 1

Views

Author

Labos Elemer, Dec 21 1999

Keywords

Comments

Unlike totients, cototient(n+1) = cototient(n) never holds -- except 2-phi(2) = 3 - phi(3) = 1 -- because cototient(n) is congruent to n modulo 2. - Labos Elemer, Aug 08 2001
Theorem (L. Redei): b^a(n) == b^n (mod n) for every integer b. - Thomas Ordowski and Robert Israel, Mar 11 2016
Let S be the sum of the cototients of the divisors of n (A001065). S < n iff n is deficient, S = n iff n is perfect, and S > n iff n is abundant. - Ivan N. Ianakiev, Oct 06 2023

Examples

			n = 12, phi(12) = 4 = |{1, 5, 7, 11}|, a(12) = 12 - phi(12) = 8, numbers not exceeding 12 and not coprime to 12: {2, 3, 4, 6, 8, 9, 10, 12}.
		

Crossrefs

Cf. A000010, A001065 (inverse Möbius transform), A005278, A001274, A083254, A098006, A049586, A051612, A053579, A054525, A062790 (Möbius transform), A063985 (partial sums), A063986, A290087.
Records: A065385, A065386.
Number of zeros in the n-th row of triangle A054521. - Omar E. Pol, May 13 2016
Cf. A063740 (number of k such that cototient(k) = n). - M. F. Hasler, Jan 11 2018

Programs

  • Haskell
    a051953 n = n - a000010 n  -- Reinhard Zumkeller, Jan 21 2014
    
  • Maple
    with(numtheory); A051953 := n->n-phi(n);
  • Mathematica
    Table[n - EulerPhi[n], {n, 1, 80}] (* Carl Najafi, Aug 16 2011 *)
  • PARI
    A051953(n) = n - eulerphi(n); \\ Michael B. Porter, Jan 28 2010
    
  • Python
    from sympy.ntheory import totient
    print([i - totient(i) for i in range(1, 101)]) # Indranil Ghosh, Mar 17 2017

Formula

a(n) = n - A000010(n).
Equals Mobius transform (A054525) of A001065. - Gary W. Adamson, Jul 11 2008
a(A006881(n)) = sopf(A006881(n)) - 1; a(A000040(n)) = 1. - Wesley Ivan Hurt, May 18 2013
G.f.: sum(n>=1, A000010(n)*x^(2*n)/(1-x^n) ). - Mircea Merca, Feb 23 2014
From Ilya Gutkovskiy, Apr 13 2017: (Start)
G.f.: -Sum_{k>=2} mu(k)*x^k/(1 - x^k)^2.
Dirichlet g.f.: zeta(s-1)*(1 - 1/zeta(s)). (End)
From Antti Karttunen, Sep 05 2018 & Apr 29 2022: (Start)
Dirichlet convolution square of A317846/A046644 gives this sequence + A063524.
a(n) = A003557(n) * A318305(n).
a(n) = A000010(n) - A083254(n).
a(n) = A318325(n) - A318326(n).
a(n) = Sum_{d|n} A062790(d) = Sum_{d|n, dA007431(d)*(A000005(n/d)-1).
a(n) = A048675(A318834(n)) = A276085(A353564(n)). [These follow from the formula below]
a(n) = Sum_{d|n, dA000010(d).
a(n) = A051612(n) - A001065(n).
(End)

A046644 From square root of Riemann zeta function: form Dirichlet series Sum b_n/n^s whose square is zeta function; sequence gives denominator of b_n.

Original entry on oeis.org

1, 2, 2, 8, 2, 4, 2, 16, 8, 4, 2, 16, 2, 4, 4, 128, 2, 16, 2, 16, 4, 4, 2, 32, 8, 4, 16, 16, 2, 8, 2, 256, 4, 4, 4, 64, 2, 4, 4, 32, 2, 8, 2, 16, 16, 4, 2, 256, 8, 16, 4, 16, 2, 32, 4, 32, 4, 4, 2, 32, 2, 4, 16, 1024, 4, 8, 2, 16, 4, 8, 2, 128, 2, 4, 16, 16, 4, 8
Offset: 1

Views

Author

Keywords

Comments

From Antti Karttunen, Aug 21 2018: (Start)
a(n) is the denominator of any rational-valued sequence f(n) which has been defined as f(n) = (1/2) * (b(n) - Sum_{d|n, d>1, d
Proof:
Proof is by induction. We assume as our induction hypothesis that the given multiplicative formula for A046644 (resp. additive formula for A046645) holds for all proper divisors d|n, dA046645(p) = 1. [Remark: for squares of primes, f(p^2) = (4*b(p^2) - 1)/8, thus a(p^2) = 8.]
First we note that A005187(x+y) <= A005187(x) + A005187(y), with equivalence attained only when A004198(x,y) = 0, that is, when x and y do not have any 1-bits in the shared positions. Let m = Sum_{e} A005187(e), with e ranging over the exponents in prime factorization of n.
For [case A] any n in A268388 it happens that only when d (and thus also n/d) are infinitary divisors of n will Sum_{e} A005187(e) [where e now ranges over the union of multisets of exponents in the prime factorizations of d and n/d] attain value m, which is the maximum possible for such sums computed for all divisor pairs d and n/d. For any n in A268388, A037445(n) = 2^k, k >= 2, thus A037445(n) - 2 = 2 mod 4 (excluding 1 and n from the count, thus -2). Thus, in the recursive formula above, the maximal denominator that occurs in the sum is 2^m which occurs k times, with k being an even number, but not a multiple of 4, thus the factor (1/2) in the front of the whole sum will ensure that the denominator of the whole expression is 2^m [which thus is equal to 2^A046645(n) = a(n)].
On the other hand [case B], for squares in A050376 (A082522, numbers of the form p^(2^k) with p prime and k>0), all the sums A005187(x)+A005187(y), where x+y = 2^k, 0 < x <= y < 2^k are less than A005187(2^k), thus it is the lonely "middle pair" f(p^(2^(k-1))) * f(p^(2^(k-1))) among all the pairs f(d)*f(n/d), 1 < d < n = p^(2^k) which yields the maximal denominator. Furthermore, as it occurs an odd number of times (only once), the common factor (1/2) for the whole sum will increase the exponent of 2 in denominator by one, which will be (2*A005187(2^(k-1))) + 1 = A005187(2^k) = A046645(p^(2^k)).
(End)
From Antti Karttunen, Aug 21 2018: (Start)
The following list gives a few such pairs num(n), b(n) for which b(n) is Dirichlet convolution of num(n)/a(n). Here ε stands for sequence A063524 (1, 0, 0, ...).
Numerators Dirichlet convolution of numerator(n)/a(n) yields
------- -----------
(End)
This sequence gives an upper bound for the denominators of any rational-valued sequence obtained as the "Dirichlet Square Root" of any integer-valued sequence. - Andrew Howroyd, Aug 23 2018

Crossrefs

See A046643 for more details. See also A046645, A317940.
Cf. A299150, A299152, A317832, A317926, A317932, A317934 (for denominator sequences of other similar constructions).

Programs

Formula

From Antti Karttunen, Jul 08 2017: (Start)
Multiplicative with a(p^n) = 2^A005187(n).
a(1) = 1; for n > 1, a(n) = A000079(A005187(A067029(n))) * a(A028234(n)).
a(n) = A000079(A046645(n)).
(End)
Sum_{j=1..n} A046643(j)/A046644(j) ~ n / sqrt(Pi*log(n)) * (1 + (1 - gamma/2)/(2*log(n))), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, May 04 2025

A317937 Numerators of sequence whose Dirichlet convolution with itself yields sequence A001221 (omega n) + A063524 (1, 0, 0, 0, ...).

Original entry on oeis.org

1, 1, 1, 3, 1, 3, 1, 5, 3, 3, 1, 7, 1, 3, 3, 35, 1, 7, 1, 7, 3, 3, 1, 11, 3, 3, 5, 7, 1, 3, 1, 63, 3, 3, 3, 9, 1, 3, 3, 11, 1, 3, 1, 7, 7, 3, 1, 75, 3, 7, 3, 7, 1, 11, 3, 11, 3, 3, 1, 1, 1, 3, 7, 231, 3, 3, 1, 7, 3, 3, 1, 19, 1, 3, 7, 7, 3, 3, 1, 75, 35, 3, 1, 1, 3, 3, 3, 11, 1, 1, 3, 7, 3, 3, 3, 133, 1, 7, 7, 9, 1, 3, 1, 11, 3
Offset: 1

Author

Antti Karttunen, Aug 12 2018

Keywords

Comments

The first negative term is a(210) = -7.

Crossrefs

Programs

  • PARI
    A317937aux(n) = if(1==n,n,(omega(n)-sumdiv(n,d,if((d>1)&&(dA317937aux(d)*A317937aux(n/d),0)))/2);
    A317937(n) = numerator(A317937aux(n));
    
  • PARI
    \\ DirSqrt(v) finds u such that v = v[1]*dirmul(u, u).
    DirSqrt(v)={my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&dAndrew Howroyd, Aug 13 2018

Formula

a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A001221(n) - Sum_{d|n, d>1, d 1.

A317845 Numerators of rational valued sequence whose Dirichlet convolution with itself yields sequence A001065 (sum of proper divisors) + A063524 (1, 0, 0, 0, ...).

Original entry on oeis.org

1, 1, 1, 11, 1, 11, 1, 45, 15, 15, 1, 95, 1, 19, 17, 659, 1, 131, 1, 135, 21, 27, 1, 315, 23, 31, 89, 175, 1, 125, 1, 2319, 29, 39, 25, 901, 1, 43, 33, 455, 1, 165, 1, 255, 215, 51, 1, 3739, 31, 291, 41, 295, 1, 671, 33, 595, 45, 63, 1, 731, 1, 67, 271, 16319, 37, 245, 1, 375, 53, 237, 1, 2135, 1, 79, 335, 415, 37, 285, 1, 5419, 1979, 87, 1
Offset: 1

Author

Antti Karttunen, Aug 12 2018

Keywords

Comments

The first negative term is a(360) = -12947.

Crossrefs

Cf. A001065, A063524, A046644 (denominators).
Cf. also A317831, A317846.

Programs

  • PARI
    A317845aux(n) = if(1==n,n,((sigma(n)-n)-sumdiv(n,d,if((d>1)&&(dA317845aux(d)*A317845aux(n/d),0)))/2);
    A317845(n) = numerator(A317845aux(n));

Formula

a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A001065(n) - Sum_{d|n, d>1, d 1.

A317938 Numerators of rational valued sequence whose Dirichlet convolution with itself yields sequence A001222 (bigomega n) + A063524 (1, 0, 0, 0, ...).

Original entry on oeis.org

1, 1, 1, 7, 1, 3, 1, 17, 7, 3, 1, 11, 1, 3, 3, 139, 1, 11, 1, 11, 3, 3, 1, 15, 7, 3, 17, 11, 1, 3, 1, 263, 3, 3, 3, 17, 1, 3, 3, 15, 1, 3, 1, 11, 11, 3, 1, 83, 7, 11, 3, 11, 1, 15, 3, 15, 3, 3, 1, -3, 1, 3, 11, 995, 3, 3, 1, 11, 3, 3, 1, 11, 1, 3, 11, 11, 3, 3, 1, 83, 139, 3, 1, -3, 3, 3, 3, 15, 1, -3, 3, 11, 3, 3, 3, 189, 1, 11, 11, 17, 1, 3, 1, 15, 3
Offset: 1

Author

Antti Karttunen, Aug 12 2018

Keywords

Crossrefs

Cf. A001222, A063524, A046644 (denominators).

Programs

  • PARI
    A317938aux(n) = if(1==n,n,(bigomega(n)-sumdiv(n,d,if((d>1)&&(dA317938aux(d)*A317938aux(n/d),0)))/2);
    A317938(n) = numerator(A317938aux(n));
    
  • PARI
    \\ Memoized implementation:
    memo317938 = Map();
    A317938aux(n) = if(1==n,n,if(mapisdefined(memo317938,n),mapget(memo317938,n),my(v = (bigomega(n)-sumdiv(n,d,if((d>1)&&(dA317938aux(d)*A317938aux(n/d),0)))/2); mapput(memo317938,n,v); (v)));

Formula

a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A001222(n) - Sum_{d|n, d>1, d 1.
Showing 1-5 of 5 results.