login
A065387
a(n) = sigma(n) + phi(n).
44
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,1
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
The semiprimes k such that a(k) is twice a square are A037074. - Augusto Santi, Nov 16 2025
a(n) is odd if and only if n > 2 and n is a perfect square or twice a perfect square (i.e., n > 2 is a term of A028982). Proof: phi(n) is odd only for n = 1, 2 (classical); even for all n > 2. sigma(n) is odd iff n is a perfect square or twice a perfect square (A028982, see A000203). For n > 2, phi(n) is even, so a(n) == sigma(n) (mod 2), which is odd iff n is in A028982. For n = 1, 2: both phi and sigma are odd so a(n) is even. QED. - Marc-André Leduc, Mar 18 2026
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.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..10000 (First 1000 terms from T. D. Noe.)
A. Makowski, Aufgaben 339, Elemente der Mathematik 15 (1960), pp. 39-40.
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
EXAMPLE
a(10) = 22 because there are 4 coprimes to 10 below 10, the divisors of 10 add up to 18, and 4 + 18 = 22.
MAPLE
with(numtheory); A065387:=n->phi(n) + sigma(n); seq(A065387(n), n=1..100); # Wesley Ivan Hurt, Apr 08 2014
MATHEMATICA
Table[EulerPhi[n] + DivisorSigma[1, n], {n, 65}] (* Alonso del Arte *)
a[n_] := SeriesCoefficient[Sum[(1+MoebiusMu[k])*x^k/(1-x^k)^2, {k, 1, n}], {x, 0, n}]; Array[a, 63] (* Jean-François Alcover, Sep 29 2017, after Ilya Gutkovskiy *)
PROG
(PARI) a(n) = sigma(n) + eulerphi(n) \\ Harry J. Smith, Oct 17 2009
(Magma) [DivisorSigma(1, k)+EulerPhi(k):k in [1..65]]; // Marius A. Burtea, Feb 09 2020
(SageMath) [sigma(n, 1)+euler_phi(n) for n in range(1, 64)] # Stefano Spezia, Jul 20 2025
CROSSREFS
See A292768 for partial sums, A051612 for sigma - phi.
Sequence in context: A184416 A187225 A003661 * A219787 A331006 A065388
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Nov 05 2001
STATUS
approved