login
A353747
a(n) = phi(n) + A064989(n), where phi is Euler totient function, and A064989 shifts the prime factorization one step towards lower primes.
5
2, 2, 4, 3, 7, 4, 11, 5, 10, 7, 17, 6, 23, 11, 14, 9, 29, 10, 35, 11, 22, 17, 41, 10, 29, 23, 26, 17, 51, 14, 59, 17, 34, 29, 39, 16, 67, 35, 46, 19, 77, 22, 83, 27, 36, 41, 89, 18, 67, 29, 58, 35, 99, 26, 61, 29, 70, 51, 111, 22, 119, 59, 56, 33, 81, 34, 127, 45, 82, 39, 137, 28, 143, 67, 58, 53, 95, 46, 151, 35, 70
OFFSET
1,1
FORMULA
a(n) = A000010(n) + A064989(n).
For n >= 0, a(4n+2) = a(2n+1).
For n > 1, a(n) = A140434(n) - A353748(n).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((p^2-p)/(p^2-q(p))) + 3/Pi^2 = 0.524667479..., where q(p) = prevprime(p) (A151799) if p > 2 and q(2) = 1. - Amiram Eldar, Dec 21 2023
MATHEMATICA
f1[p_, e_] := (p - 1)*p^(e - 1); f2[p_, e_] := If[p == 2, 1, NextPrime[p, -1]^e]; a[1] = 2; a[n_] := Times @@ f1 @@@ (f = FactorInteger[n]) + Times @@ f2 @@@ f; Array[a, 80] (* Amiram Eldar, May 07 2022 *)
PROG
(PARI)
A064989(n) = { my(f=factor(n>>valuation(n, 2))); for(i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f); };
A353747(n) = (eulerphi(n)+A064989(n));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 06 2022
STATUS
approved