login
a(n) = A353454(A064989(n)).
2

%I #11 Apr 21 2022 11:24:46

%S 1,1,-1,1,1,-1,-1,1,0,1,1,-1,-1,-1,1,1,1,0,-1,1,1,1,1,-1,0,-1,0,-1,-1,

%T 1,1,1,1,1,-1,0,-1,-1,1,1,1,1,-1,1,2,1,1,-1,0,0,1,-1,-1,0,-3,-1,1,-1,

%U 1,1,-1,1,0,1,-1,1,1,1,1,-1,-1,0,1,-1,0,-1,1,1,-1,1,0,1,1,1,-3,-1,1,1,-1,2,-3,1,1,1,-1

%N a(n) = A353454(A064989(n)).

%H Antti Karttunen, <a href="/A353455/b353455.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F For all n >= 1, a(A000040(n)) = ((-1)^(n-1)).

%o (PARI)

%o A000265(n) = (n>>valuation(n,2));

%o A064989(n) = { my(f=factor(A000265(n))); for(i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f); };

%o memoA353454 = Map();

%o A353454(n) = if(1==n,1,my(v); if(mapisdefined(memoA353454,n,&v), v, v = -sumdiv(n,d,if(d<n,A353454(A064989(n))*A353454(d),0)); mapput(memoA353454,n,v); (v)));

%o A353455(n) = A353454(A064989(n));

%Y Cf. A000040, A064989, A353454.

%Y Cf. also A353458.

%K sign

%O 1,45

%A _Antti Karttunen_, Apr 21 2022