[go: up one dir, main page]

login
A324397
a(1) = 0; for n > 1, a(n) = A297114(A156552(n)).
3
0, 0, 0, 0, 0, 2, 0, 3, -2, 3, 0, 7, 0, 14, -2, 0, 0, 9, 0, 15, -6, 9, 0, 18, -4, 33, -2, 14, 0, 4, 0, 25, -2, 42, -4, 7, 0, 254, -26, 9, 0, 33, 0, 63, -2, 140, 0, 41, -8, 14, -34, 127, 0, 24, -12, 66, -90, 579, 0, 38, 0, 684, -2, 6, -4, 21, 0, 175, -2, 37, 0, 24, 0, 3587, -2, 304, -8, 85, 0, 73, -14, 2733, 0, 6, -52, 8707, -378, 11, 0, 3
OFFSET
1,6
LINKS
FORMULA
a(1) = 0; for n > 1, a(n) = A297114(A156552(n)).
For all n >= 1, a(2n-1) = A324103(2n-1).
MATHEMATICA
Array[If[# == 1, 0, Function[n, DivisorSum[n, MoebiusMu[n/#] (2 # - DigitCount[2 #, 2, 1] - DivisorSigma[1, #]) &]]@ Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ #]]] &, 90] (* Michael De Vlieger, Mar 11 2019 *)
PROG
(PARI)
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));
A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
\\ Slow: A297114(n) = sumdiv(n, d, moebius(n/d)*(A005187(d)-sigma(d)));
A297111(n) = sumdiv(n, d, moebius(n/d)*A005187(d));
A297114(n) = (A297111(n) - n);
A324397(n) = if(1==n, 0, A297114(A156552(n)));
KEYWORD
sign
AUTHOR
Antti Karttunen, Mar 05 2019
STATUS
approved