login
The absolute values of A275966.
1

%I #19 Jan 27 2024 07:11:45

%S 1,1,2,0,0,2,2,0,2,0,2,0,0,2,0,0,0,2,2,0,4,2,2,0,0,0,2,0,0,0,2,0,4,0,

%T 0,0,0,2,0,0,0,4,2,0,0,2,2,0,2,0,0,0,0,2,0,0,4,0,2,0,0,2,4,0,0,4,2,0,

%U 4,0,2,0,0,0,0,0,4,0,2,0,2,0,2,0,0,2,0

%N The absolute values of A275966.

%C This is multiplicative function with a(p^n) = |Re(I^(p^n+1) - I^(p^(n-1)+1))|.

%H Charles R Greathouse IV, <a href="/A284059/b284059.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = |Re(I*Sum_{d|n}(mobius(d)*I^(n/d)))|.

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/Pi = 0.954929... (A089491). - _Amiram Eldar_, Jan 27 2024

%e a(9) = |Re(I*(mobius(1)*I^9 + mobius(3)*I^3 + mobius(9)*I))| = |Re((I^10 - I^4))| = |-2| = 2.

%p a(n):=abs(Re(I*add(numtheory:-mobius(d)*I^(n/d), d = numtheory:-divisors(n)))).

%t Table[Abs@ Re[I* Sum[MoebiusMu[d] * I^(n/d), {d, Divisors[n]}]], {n, 87}] (* _Indranil Ghosh_, Mar 19 2017 *)

%t f[p_, e_] := If[Mod[p, 4] == 1, 0, 2]; f[2, e_] := If[e == 1, 1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Jan 27 2024 *)

%o (PARI) a(n)=my(f=factor(n)); prod(i=1,#f~, if(f[i,1]==2, if(f[i,2]==1,1,0), if(f[i,1]%4==3, 2, 0))) \\ _Charles R Greathouse IV_, Mar 22 2017

%Y Cf. A089491, A275966.

%K nonn,mult

%O 1,3

%A _Gevorg Hmayakyan_, Mar 19 2017