cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A353459 Sum of A353457 and its Dirichlet inverse.

This page as a plain text file.
%I A353459 #18 Jan 05 2023 11:22:29
%S A353459 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 A353459 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 A353459 -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 A353459 Sum of A353457 and its Dirichlet inverse.
%C A353459 Only values in range {-2, -1, 0, +1, +2} occur.
%H A353459 Antti Karttunen, <a href="/A353459/b353459.txt">Table of n, a(n) for n = 1..65537</a>
%H A353459 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%F A353459 a(n) = A353457(n) + A353458(n) = A353457(n) + A353457(A064989(n)).
%F A353459 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 A353459 For all n >= 1, a(n) = a(A003961(n)) = a(A348717(n)).
%o A353459 (PARI)
%o A353459 A000265(n) = (n>>valuation(n,2));
%o A353459 A064989(n) = { my(f=factor(A000265(n))); for(i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f); };
%o A353459 memoA353457 = Map();
%o A353459 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 A353459(n) = (A353457(n)+A353457(A064989(n)));
%o A353459 (Python)
%o A353459 from math import prod
%o A353459 from sympy import factorint, primepi
%o A353459 def A353459(n):
%o A353459     f = [(primepi(p)&1, -int(e==1)) for p, e in factorint(n).items()]
%o A353459     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 A353459 Cf. A003961, A348717, A353457, A353458.
%Y A353459 Cf. also A353469.
%K A353459 sign
%O A353459 1,1
%A A353459 _Antti Karttunen_, Apr 21 2022