login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Sum of A353457 and its Dirichlet inverse.
7

%I #18 Jan 05 2023 11:22:29

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

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

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

%N Sum of A353457 and its Dirichlet inverse.

%C Only values in range {-2, -1, 0, +1, +2} occur.

%H Antti Karttunen, <a href="/A353459/b353459.txt">Table of n, a(n) for n = 1..65537</a>

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

%F a(n) = A353457(n) + A353458(n) = A353457(n) + A353457(A064989(n)).

%F For n > 1, a(n) = -Sum_{d|n, 1<d<n} A353457(d) * A353458(n/d). [As the sequences are Dirichlet inverses of each other]

%F For all n >= 1, a(n) = a(A003961(n)) = a(A348717(n)).

%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 memoA353457 = Map();

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

%o A353459(n) = (A353457(n)+A353457(A064989(n)));

%o (Python)

%o from math import prod

%o from sympy import factorint, primepi

%o def A353459(n):

%o f = [(primepi(p)&1, -int(e==1)) for p, e in factorint(n).items()]

%o return prod(e for p, e in f if not p)+prod(e for p, e in f if p) # _Chai Wah Wu_, Jan 05 2023

%Y Cf. A003961, A348717, A353457, A353458.

%Y Cf. also A353469.

%K sign

%O 1,1

%A _Antti Karttunen_, Apr 21 2022