# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a336469 Showing 1-1 of 1 %I A336469 #25 Jul 25 2020 10:34:48 %S A336469 0,0,0,0,0,0,1,0,1,0,1,0,1,1,0,0,0,1,2,0,1,1,2,0,1,1,2,1,2,0,2,0,1,0, %T A336469 1,1,2,2,1,0,1,1,3,1,1,2,3,0,3,1,0,1,2,2,1,1,2,2,3,0,2,2,2,0,1,1,3,0, %U A336469 2,1,3,1,2,2,1,2,2,1,3,0,3,1,2,1,0,3,2,1,2,1,2,2,2,3,2,0,1,3,2,1,2,0,2,1,1 %N A336469 a(n) = A329697(phi(n)), where A329697 is totally additive with a(2) = 0 and a(p) = 1 + a(p-1) for odd primes. %H A336469 Antti Karttunen, Table of n, a(n) for n = 1..65537 %F A336469 Additive with a(2^e) = 0, and for odd primes p, a(p^e) = A329697((p - 1)*p^(e-1)) = e*A329697(p) - 1. %F A336469 a(n) = A329697(n) - A005087(n) = A336396(n) + A046660(A000265(n)). %t A336469 Array[Length@ NestWhileList[# - #/FactorInteger[#][[-1, 1]] &, EulerPhi[#], # != 2^IntegerExponent[#, 2] &] - 1 &, 105] (* _Michael De Vlieger_, Jul 24 2020 *) %o A336469 (PARI) %o A336469 A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1])))); %o A336469 A336469(n) = A329697(eulerphi(n)); %o A336469 \\ Or alternatively as: %o A336469 A336469(n) = { my(f = factor(n)); sum(k=1, #f~, if(2==f[k,1],0,-1 + (f[k, 2]*A329697(f[k, 1])))); }; %Y A336469 Cf. A000010, A000265, A003434, A005087, A046660, A064097, A064415, A329697, A336396, A336477. %Y A336469 Cf. A003401 (positions of zeros). %K A336469 nonn %O A336469 1,19 %A A336469 _Antti Karttunen_, Jul 22 2020 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE