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 34 results. Next

A077099 a(n) = gcd(A051612(n), A065387(n)), where A051612(n) = sigma(n) - phi(n) and A065387(n) = sigma(n) + phi(n).

Original entry on oeis.org

2, 2, 2, 1, 2, 2, 2, 1, 1, 2, 2, 8, 2, 6, 16, 1, 2, 3, 2, 2, 4, 2, 2, 4, 1, 6, 2, 4, 2, 16, 2, 1, 4, 2, 24, 1, 2, 6, 16, 2, 2, 12, 2, 8, 6, 2, 2, 4, 3, 1, 8, 2, 2, 6, 16, 48, 4, 2, 2, 8, 2, 6, 4, 1, 12, 4, 2, 2, 4, 24, 2, 3, 2, 6, 4, 8, 12, 48, 2, 2, 1, 2, 2, 8, 4, 6, 16, 20, 2, 6, 8, 4, 4, 2, 48, 4, 2, 3
Offset: 1

Views

Author

Labos Elemer, Nov 06 2002

Keywords

Comments

If a(n)=1, then n is either square or twice a square.

Crossrefs

Programs

  • Mathematica
    sep[n_]:=Module[{s=DivisorSigma[1,n],e=EulerPhi[n]},GCD[s+e,s-e]]; Array[sep,100] (* Harvey P. Dale, Jun 17 2011 *)
  • PARI
    a(n)=my(f=factor(n),s=sigma(f),p=eulerphi(f)); gcd(2*p,s-p) \\ Charles R Greathouse IV, Jan 02 2014

Extensions

Edited by Dean Hickerson, Nov 07 2002

A077100 a(n) = lcm(A051612(n), A065387(n)), where A051612(n) = sigma(n) - phi(n) and A065387(n) = sigma(n) + phi(n).

Original entry on oeis.org

0, 4, 6, 45, 10, 70, 14, 209, 133, 154, 22, 96, 26, 90, 32, 897, 34, 495, 38, 850, 220, 598, 46, 884, 561, 270, 638, 748, 58, 320, 62, 3713, 476, 1330, 72, 8137, 74, 546, 160, 3922, 82, 756, 86, 832, 918, 2350, 94, 3780, 495, 8249, 520, 4514, 106, 2346, 224
Offset: 1

Views

Author

Labos Elemer, Nov 06 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Table[LCM[#1 - #2, #1 + #2] & @@ {DivisorSigma[1, n], EulerPhi@ n}, {n, 55}] (* Michael De Vlieger, Dec 17 2016 *)
  • PARI
    a(n)=my(f=factor(n),e=eulerphi(f),s=sigma(f)); lcm(s+e,s-e) \\ Charles R Greathouse IV, Nov 27 2013

Formula

If p is prime, then a(p) = 2*p.

Extensions

Edited by Dean Hickerson, Nov 07 2002

A077101 a(n) = A051612(n)*A065387(n) = sigma(n)^2-phi(n)^2, where A051612(n) = sigma(n) - phi(n) and A065387(n) = sigma(n) + phi(n).

Original entry on oeis.org

0, 8, 12, 45, 20, 140, 28, 209, 133, 308, 44, 768, 52, 540, 512, 897, 68, 1485, 76, 1700, 880, 1196, 92, 3536, 561, 1620, 1276, 2992, 116, 5120, 124, 3713, 1904, 2660, 1728, 8137, 148, 3276, 2560, 7844, 164, 9072, 172, 6656, 5508, 4700, 188, 15120, 1485
Offset: 1

Views

Author

Labos Elemer, Nov 06 2002

Keywords

Comments

If n is prime, then a(n) = 4n.

Crossrefs

Programs

Formula

a(n) = A077099(n) * A077100(n). - Antti Karttunen, May 26 2017
From Amiram Eldar, Dec 04 2023: (Start)
a(n) = A072861(n) - A127473(n).
Sum_{k=1..n} a(k) ~ c * n^3 / 3, where c = 5*zeta(3)/2 - Product_{p prime}(1 - (2*p-1)/p^3) = (5/2)*A002117 - A065464 = 2.576892... . (End)

Extensions

Edited by Dean Hickerson, Nov 07 2002

A292769 Partial sums of A051612.

Original entry on oeis.org

0, 2, 4, 9, 11, 21, 23, 34, 41, 55, 57, 81, 83, 101, 117, 140, 142, 175, 177, 211, 231, 257, 259, 311, 322, 352, 374, 418, 420, 484, 486, 533, 561, 599, 623, 702, 704, 746, 778, 852, 854, 938, 940, 1004, 1058, 1108, 1110, 1218, 1233, 1306, 1346, 1420, 1422, 1524, 1556, 1652, 1696, 1758, 1760, 1912
Offset: 1

Views

Author

N. J. A. Sloane, Sep 28 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[DivisorSigma[1, n] - EulerPhi[n], {n, 1, 50}]] (* Amiram Eldar, Oct 27 2022 *)
  • PARI
    lista(nmax) = {my(s = 0, f); for(n = 1, nmax, f = factor(n); s += sigma(f) - eulerphi(f); print1(s, ", "));} \\ Amiram Eldar, Oct 27 2022

Formula

G.f.: (1/(1 - x))*Sum_{k>=1} (1 - mu(k))*x^k/(1 - x^k)^2. - Ilya Gutkovskiy, Sep 28 2017
a(n) ~ c * n^2 + O(n*log(n)), where c = Pi^2/12 - 3/Pi^2 = 0.518503... . - Amiram Eldar, Oct 27 2022

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)

A065387 a(n) = sigma(n) + phi(n).

Original entry on oeis.org

2, 4, 6, 9, 10, 14, 14, 19, 19, 22, 22, 32, 26, 30, 32, 39, 34, 45, 38, 50, 44, 46, 46, 68, 51, 54, 58, 68, 58, 80, 62, 79, 68, 70, 72, 103, 74, 78, 80, 106, 82, 108, 86, 104, 102, 94, 94, 140, 99, 113, 104, 122, 106, 138, 112, 144, 116, 118, 118, 184, 122, 126, 140
Offset: 1

Views

Author

Labos Elemer, Nov 05 2001

Keywords

Comments

a(n) = 2n for n listed in A008578, the prime numbers at the beginning of the 20th century. When a(n) = a(n + 1), n is probably listed in A066198, numbers n where phi changes as fast as sigma (the only exceptions below 10000 are 2 and 854). - Alonso del Arte, Nov 16 2005
A. Makowski proved that n is prime if and only if a(n) = n * d(n), where d is A000005. - Charles R Greathouse IV, Mar 19 2012
If n is semiprime, a(n) = 2n+1+ceiling(sqrt(n))-floor(sqrt(n)). - Wesley Ivan Hurt, May 05 2015
Atanassov proves that a(n) >= n + A001414(n). - Charles R Greathouse IV, Dec 06 2016
a(n) = 2*n+1 iff n is square of prime (A001248), a(n) = 2*(n+1) iff n is squarefree semiprime (A006881). - Bernard Schott, Feb 09 2020

Examples

			a(10) = 22 because there are 4 coprimes to 10 below 10, the divisors of 10 add up to 18, and 4 + 18 = 22.
		

References

  • K. Atanassov, New integer functions, related to ψ and σ functions. IV., Bull. Number Theory Related Topics 12 (1988), pp. 31-35.
  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004. See Section B41, p. 149.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 162.

Crossrefs

See A292768 for partial sums, A051612 for sigma - phi.

Programs

Formula

a(n) = A000203(n) + A000010(n).
a(n) = A051709(n) + 2n. - N. J. A. Sloane, Jun 12 2004
G.f.: Sum_{k>=1} (mu(k) + 1)*x^k/(1 - x^k)^2. - Ilya Gutkovskiy, Sep 29 2017

A051709 a(n) = sigma(n) + phi(n) - 2n.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 3, 1, 2, 0, 8, 0, 2, 2, 7, 0, 9, 0, 10, 2, 2, 0, 20, 1, 2, 4, 12, 0, 20, 0, 15, 2, 2, 2, 31, 0, 2, 2, 26, 0, 24, 0, 16, 12, 2, 0, 44, 1, 13, 2, 18, 0, 30, 2, 32, 2, 2, 0, 64, 0, 2, 14, 31, 2, 32, 0, 22, 2, 28, 0, 75, 0, 2, 14, 24, 2, 36, 0
Offset: 1

Views

Author

Keywords

Comments

Sigma is the sum of divisors (A000203), and phi is the Euler totient function (A000010). - Michael B. Porter, Jul 05 2013
Because sigma and phi are multiplicative functions, it is easy to show that (1) if a(n)=0, then n is prime or 1 and (2) if a(n)=2, then n is the product of two distinct prime numbers. Note that a(n) is the n-th term of the Dirichlet series whose generating function is given below. Using the generating function, it is theoretically possible to compute a(n). Hence a(n)=0 could be used as a primality test and a(n)=2 could be used as a test for membership in P2 (A006881). - T. D. Noe, Aug 01 2002
It appears that a(n) - A002033(n) = zeta(s-1) * (zeta(s) - 2 + 1/zeta(s)) + 1/(zeta(s)-2). - Eric Desbiaux, Jul 04 2013
a(n) = 1 if and only if n = prime(k)^2 (n is in A001248). It seems that a(n) = k has only finitely many solutions for k >= 3. - Jianing Song, Jun 27 2021

Examples

			a(5) = sigma(5) + phi(5) - 2*5 = 6 + 4 - 10 = 0.
		

Crossrefs

Cf. A278373 (range of this sequence), A056996 (numbers not present).
Cf. also A344753, A345001 (analogous sequences).

Programs

  • Mathematica
    Table[DivisorSigma[1,n]+EulerPhi[n]-2n,{n,80}] (* Harvey P. Dale, Apr 08 2015 *)
  • PARI
    a(n)=sigma(n)+eulerphi(n)-2*n \\ Charles R Greathouse IV, Jul 05 2013
    
  • PARI
    A051709(n) = -sumdiv(n,d,(dAntti Karttunen, Mar 02 2018

Formula

Dirichlet g.f.: zeta(s-1) * (zeta(s) - 2 + 1/zeta(s)). - T. D. Noe, Aug 01 2002
From Antti Karttunen, Mar 02 2018: (Start)
a(n) = A001065(n) - A051953(n). [Difference between the sum of proper divisors of n and their Moebius-transform.]
a(n) = -Sum_{d|n, dA008683(n/d)*A001065(d). (End)
Sum_{k=1..n} a(k) = (3/(Pi^2) + Pi^2/12 - 1) * n^2 + O(n*log(n)). - Amiram Eldar, Dec 03 2023

A110086 Numbers k such that sigma(k) - phi(k) <= tau(k)^omega(k), where sigma = A000203, phi = A000010, tau = A000005 and omega = A001221.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 11, 12, 13, 15, 17, 18, 19, 20, 23, 24, 29, 30, 31, 36, 37, 41, 42, 43, 47, 53, 59, 60, 61, 66, 67, 70, 71, 73, 78, 79, 83, 84, 89, 90, 97, 101, 102, 103, 105, 107, 109, 110, 113, 114, 120, 126, 127, 130, 131, 132, 137, 138, 139, 140, 149, 150, 151
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 11 2005

Keywords

Crossrefs

Union of A000040 and A110085.
Complement of A110086.

Programs

  • Haskell
    a110086 n = a110086_list !! (n-1)
    a110086_list = filter (\x -> a051612 x <= a110088 x) [1..]
    -- Reinhard Zumkeller, Aug 05 2014
  • Mathematica
    q[k_] := DivisorSigma[1, k] - EulerPhi[k] <= DivisorSigma[0, k]^PrimeNu[k]; Select[Range[160], q] (* Amiram Eldar, Sep 15 2024 *)
  • PARI
    is(n)=sigma(n)-eulerphi(n)<=numdiv(n)^omega(n) \\ Charles R Greathouse IV, Feb 14 2013
    

Formula

A051612(a(n)) <= A110088(a(n)).

A073815 Least number x such that gcd(phi(x), sigma(x)) = n.

Original entry on oeis.org

1, 3, 18, 12, 200, 14, 3364, 15, 722, 328, 9801, 42, 25281, 116, 1800, 165, 36992, 810, 4414201, 88, 196, 29161, 541696, 35, 2928200, 1413, 103968, 172, 98942809, 488, 1547536, 336, 19602, 17536, 814088, 370, 49042009, 55297, 1521, 319, 3150464641
Offset: 1

Views

Author

Labos Elemer, Nov 12 2002

Keywords

Comments

Values are frequently identical to terms of A077102. Since gcd(a,b) and gcd(a+b,a-b) may differ, so may the smallest solutions. A077102(m) and a(m) differ at m = 1, 2, 4, 8, 16, 28, 32, 40, etc.

Crossrefs

Programs

  • Mathematica
    f[x_] := Apply[GCD, {DivisorSigma[1, x], EulerPhi[x]}] t=Table[0, {100}]; Do[s=f[n]; If[s<101&&t[[s]]==0, t[[s]]=n], {n, 1, 10^13}];
  • PARI
    a(n)=my(x=n);while(gcd(eulerphi(x),sigma(x))!=n, x++); x \\ Charles R Greathouse IV, Dec 09 2013

Formula

a(n) = Min{x; A055008(x)=n}. a(n)=Min{x; gcd(A000203(x), A000010(x))=n}
a(n) = Min{x: A023897(x)= n}, smallest balanced number (A020492) for which the quotient equals n.

A244448 a(n) is the smallest integer m such that m-n is composite and phi(m-n) + sigma(m+n) = phi(m+n) + sigma(m-n).

Original entry on oeis.org

4, 153, 442, 213, 179, 120, 46, 37, 47, 264, 145416, 1101, 107, 79, 71, 78, 716, 637, 98, 249, 71, 126, 13258, 1243, 119, 163, 119, 131, 140497, 381, 191, 156, 101, 169, 1574, 315, 151, 193, 167, 2158, 148, 104, 202, 289, 1969, 882, 2572, 428, 251, 357, 314, 283
Offset: 0

Views

Author

Keywords

Comments

For each n, a(n) > n and like a(n)-n, a(n)+n is also composite.
If both numbers p and p + 2n are primes then x = p+n is a solution to the equation phi(x-n) + sigma(x+n) = phi(x+n) + sigma(x-n). But for these many solutions x, both numbers x-n and x+n are primes.
a(n) is the smallest integer m such that m-n is composite and A051612(m+n) = A051612(m-n) where A051612(n) = sigma(n) - phi(n). - Michel Marcus, Mar 20 2020

Examples

			a(1)=153 because 153-1 is composite, phi(153-1)+sigma(153+1) = phi(153+1)+sigma(153-1) and there is no such number less than 153.
		

Crossrefs

Cf. A000010 (phi), A000203 (sigma), A051612 (sigma - phi).

Programs

  • Mathematica
    a[0]=4;a[n_]:=a[n]=(For[m=n+1,PrimeQ[m-n]||EulerPhi[m-n]+DivisorSigma[1,m+n]!=EulerPhi[m+n]+DivisorSigma[1,m-n],m++];m);
    Table[a[n],{n,0,70}]
  • PARI
    a(n) = {my(m=n+4); while(isprime(m-n) || eulerphi(m+n)+sigma(m-n)!=eulerphi(m-n)+sigma(m+n), m++); m; }
    vector(100,n,a(n)) \\ Derek Orr, Aug 30 2014
Showing 1-10 of 34 results. Next