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.
%I A374366 #43 Jul 07 2024 17:27:30 %S A374366 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 A374366 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 A374366 4,0,2,2,0,0,0,2,4,0,2,0,2,0,2,4,0,2 %N A374366 a(n) = Im(Sum_{k=1..n} [k|n]*A008683(k)*(i^k)). %C A374366 Conjecture 1: Numbers n such that a(n) = 0 is A009003. %C A374366 Conjecture 2: Numbers n such that a(n) = 1 is A000079. %C A374366 From _Chai Wah Wu_, Jul 06-07 2024: (Start) %C A374366 a(n) = sum_d A374367(d) where d ranges over all odd squarefree divisors of n. %C A374366 a(n) = a(A000265(n)). %C A374366 a(2^k) = 1 as 1 is the only odd squarefree divisor of 2^k. %C A374366 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 A374366 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 A374366 Theorem: a(n) is multiplicative. %C A374366 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 A374366 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 A374366 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 A374366 This means that Conjectures 1 and 2 above are true. %C A374366 (End) %F A374366 a(n) = Im(Sum_{k=1..n} [k|n]*A008683(k)*(i^k)). %F A374366 a(n) = 0 if n is in A009003 and 2^A005091(n) otherwise. - _Chai Wah Wu_, Jul 07 2024 %t A374366 nn = 86; ParallelTable[Im[Sum[If[Mod[n, k] == 0, 1, 0]*(I^k)*MoebiusMu[k], {k, 1, n}]], {n, 1, nn}] %o A374366 (Python) %o A374366 from sympy import mobius, divisors %o A374366 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 A374366 (Python) %o A374366 from sympy import primefactors %o A374366 def A374366(n): # based on multiplicative property of a(n) %o A374366 a = 0 %o A374366 for p in primefactors(n>>(~n & n-1).bit_length()): %o A374366 if p&2: %o A374366 a += 1 %o A374366 else: %o A374366 return 0 %o A374366 return 1<<a # _Chai Wah Wu_, Jul 07 2024 %Y A374366 Cf. A000265, A005091, A008683, A009003, A000079, A374367. %K A374366 nonn,mult %O A374366 1,3 %A A374366 _Mats Granvik_, Jul 06 2024