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”).
%I #43 Jul 07 2024 17:27:30
%S 1,1,2,1,0,2,2,1,2,0,2,2,0,2,0,1,0,2,2,0,4,2,2,2,0,0,2,2,0,0,2,1,4,0,
%T 0,2,0,2,0,0,0,4,2,2,0,2,2,2,2,0,0,0,0,2,0,2,4,0,2,0,0,2,4,1,0,4,2,0,
%U 4,0,2,2,0,0,0,2,4,0,2,0,2,0,2,4,0,2
%N a(n) = Im(Sum_{k=1..n} [k|n]*A008683(k)*(i^k)).
%C Conjecture 1: Numbers n such that a(n) = 0 is A009003.
%C Conjecture 2: Numbers n such that a(n) = 1 is A000079.
%C From _Chai Wah Wu_, Jul 06-07 2024: (Start)
%C a(n) = sum_d A374367(d) where d ranges over all odd squarefree divisors of n.
%C a(n) = a(A000265(n)).
%C a(2^k) = 1 as 1 is the only odd squarefree divisor of 2^k.
%C a((4*m+1)^k) = 0 if 4*m+1 is prime and k > 0 since the only odd squarefree divisors of (4*m+1)^k is 1 and 4*m+1 and a(1) = 1 and a(4*m+1)= -1.
%C a((4*m+3)^k) = 2 if 4*m+1 is prime and k > 0 since the only odd squarefree divisors of (4*m+3)^k is 1 and 4*m+3 and a(1) = 1 and a(4*m+3)= 1.
%C Theorem: a(n) is multiplicative.
%C Proof: Im(i^k) = 1 if k == 1 (mod 4), Im(i^k) = 0 if k == 0 or 2 (mod 4) and Im(i^k) = -1 if k == 3 (mod 4). Noting that 3*3 == 1 (mod 4), it is easy to verify that Im(i^k) is multiplicative. Since a(n) = sum_{d|n} mu(d)*Im(i^d) and mu is multiplicative, a proof similar to the proof of the multiplicative property of the Dirichlet convolution shows that a(n) is also multiplicative.
%C This implies that a(n) = 0 if n has a prime factor of the form 4*m+1 and a(n) = 2^(number of prime factors of n of the form 4*m+3) otherwise.
%C Since A009003 are exactly the numbers that contains a prime factor of the form 4*m+1, this can be written more succinctly as a(n) = 0 if n is in A009003 and a(n) = 2^A005091(n) otherwise.
%C This means that Conjectures 1 and 2 above are true.
%C (End)
%F a(n) = Im(Sum_{k=1..n} [k|n]*A008683(k)*(i^k)).
%F a(n) = 0 if n is in A009003 and 2^A005091(n) otherwise. - _Chai Wah Wu_, Jul 07 2024
%t nn = 86; ParallelTable[Im[Sum[If[Mod[n, k] == 0, 1, 0]*(I^k)*MoebiusMu[k], {k, 1, n}]], {n, 1, nn}]
%o (Python)
%o from sympy import mobius, divisors
%o def A374366(n): return sum(-mobius(d) if d&2 else mobius(d) for d in divisors(n>>(~n & n-1).bit_length(),generator=True)) # _Chai Wah Wu_, Jul 06 2024
%o (Python)
%o from sympy import primefactors
%o def A374366(n): # based on multiplicative property of a(n)
%o a = 0
%o for p in primefactors(n>>(~n & n-1).bit_length()):
%o if p&2:
%o a += 1
%o else:
%o return 0
%o return 1<<a # _Chai Wah Wu_, Jul 07 2024
%Y Cf. A000265, A005091, A008683, A009003, A000079, A374367.
%K nonn,mult
%O 1,3
%A _Mats Granvik_, Jul 06 2024