%I #24 Dec 21 2023 10:22:51
%S 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,
%T 26,17,51,14,59,17,34,29,39,16,67,35,46,19,77,22,83,27,36,41,89,18,67,
%U 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
%N a(n) = phi(n) + A064989(n), where phi is Euler totient function, and A064989 shifts the prime factorization one step towards lower primes.
%H Antti Karttunen, <a href="/A353747/b353747.txt">Table of n, a(n) for n = 1..16384</a>
%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>.
%F a(n) = A000010(n) + A064989(n).
%F For n >= 0, a(4n+2) = a(2n+1).
%F For n > 1, a(n) = A140434(n) - A353748(n).
%F 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
%t 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 *)
%o (PARI)
%o A064989(n) = { my(f=factor(n>>valuation(n,2))); for(i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f); };
%o A353747(n) = (eulerphi(n)+A064989(n));
%Y Cf. A000010, A064989, A104141, A140434, A151799, A353748.
%K nonn
%O 1,1
%A _Antti Karttunen_, May 06 2022