login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A053158 Sum of n and its cototient function value (A051953): a(n) = 2*n - phi(n), where phi is Euler phi. 2
1, 3, 4, 6, 6, 10, 8, 12, 12, 16, 12, 20, 14, 22, 22, 24, 18, 30, 20, 32, 30, 34, 24, 40, 30, 40, 36, 44, 30, 52, 32, 48, 46, 52, 46, 60, 38, 58, 54, 64, 42, 72, 44, 68, 66, 70, 48, 80, 56, 80, 70, 80, 54, 90, 70, 88, 78, 88, 60, 104, 62, 94, 90, 96, 82, 112, 68, 104, 94, 116 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
For Mersenne primes and also for certain composites the values of this function are powers of 2.
LINKS
FORMULA
a(n) = n + A051953(n) = 2n - phi(n), where phi is A000010.
a(2^k) = 3*2^(k-1).
Sum_{k=1..n} a(k) = c * n^2 + O(n*log(n)), where c = 1 - 3/Pi^2 = 0.696036... . - Amiram Eldar, Dec 16 2023
EXAMPLE
a(127) = 254 - 126 = 128.
a(80) = 160 - 32 = 128.
MATHEMATICA
a[n_] := 2*n - EulerPhi[n]; Array[a, 60] (* Amiram Eldar, Dec 16 2023 *)
PROG
(PARI) a(n) = 2*n - eulerphi(n); \\ Michel Marcus, Dec 19 2013
(Magma) [2*n - EulerPhi(n): n in [1..100]]; // G. C. Greubel, Feb 12 2024
(SageMath) [2*n - euler_phi(n) for n in range(1, 101)] # G. C. Greubel, Feb 12 2024
CROSSREFS
Sequence in context: A175708 A023830 A063649 * A206924 A185443 A275258
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Feb 29 2000
EXTENSIONS
Name amended with formula by Antti Karttunen, Nov 15 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 08:27 EDT 2024. Contains 371698 sequences. (Running on oeis4.)