login
Multiplicative sequence with a(p^e) = (-1)^e * p^(2*floor(e/2)) for prime p and e >= 0.
1

%I #15 Jan 17 2023 18:30:11

%S 1,-1,-1,4,-1,1,-1,-4,9,1,-1,-4,-1,1,1,16,-1,-9,-1,-4,1,1,-1,4,25,1,

%T -9,-4,-1,-1,-1,-16,1,1,1,36,-1,1,1,4,-1,-1,-1,-4,-9,1,-1,-16,49,-25,

%U 1,-4,-1,9,1,4,1,1,-1,4,-1,1,-9,64,1,-1,-1,-4,1,-1,-1,-36,-1,1,-25,-4,1,-1,-1,-16

%N Multiplicative sequence with a(p^e) = (-1)^e * p^(2*floor(e/2)) for prime p and e >= 0.

%C Signed version of A008833.

%F a(n) = lambda(n) * A008833(n) for n > 0 where lambda(n) = A008836(n).

%F Dirichlet g.f.: zeta(2*s-2) / zeta(s).

%F Dirichlet inverse b(n), n > 0, is multiplicative with b(p) = 1 and b(p^e) = 1 - p^2 for prime p and e > 1.

%F Dirichlet convolution with A034444 equals A008833.

%F Equals Dirichlet convolution of A000010 and A061019.

%F Conjecture: a(n) = Sum_{k=1..n} gcd(k, n) * lambda(gcd(k, n)) for n > 0.

%p A358272 := proc(n)

%p local a,pe,e,p ;

%p a := 1;

%p for pe in ifactors(n)[2] do

%p e := op(2,pe) ;

%p p := op(1,pe) ;

%p a := a*(-1)^e*p^(2*floor(e/2)) ;

%p end do:

%p a ;

%p end proc:

%p seq(A358272(n),n=1..80) ; # _R. J. Mathar_, Jan 17 2023

%t f[p_, e_] := (-1)^e * p^(2*Floor[e/2]); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Nov 07 2022 *)

%o (Python)

%o from math import prod

%o from sympy import factorint

%o def A358272(n): return prod(-p**(e&-2) if e&1 else p**(e&-2) for p, e in factorint(n).items()) # _Chai Wah Wu_, Jan 17 2023

%Y Cf. A000010, A008833, A008836, A034444, A061019.

%K sign,easy,mult

%O 1,4

%A _Werner Schulte_, Nov 07 2022