OFFSET
1,1
COMMENTS
LINKS
R. J. Mathar, Table of n, a(n) for n = 1..1000
Gérard P. Michon, Multiplicative Functions.
Gérard P. Michon, Partition Function and Pentagonal Numbers.
FORMULA
Multiplicative function for which a(p^e) either vanishes or is equal to (-1)^m, for any prime p, if e is either m(3m-1)/2 or m(3m+1)/2 (these integers are the pentagonal numbers of the first and second kind, A000326 and A005449).
Dirichlet g.f.: 1 / Product_{k>=1} zeta(k*s). - Ilya Gutkovskiy, Nov 06 2020
Sum_{k=1..n} abs(a(k)) ~ c * n, where c = Product_{p prime} ((1-1/p) * (1 + Sum_{m>=1} (1/p^(m*(3*m-1)/2) + 1/p^(m*(3*m+1)/2)))) = 0.85358290653064143678... . - Amiram Eldar, Feb 17 2024
EXAMPLE
a(8) and a(27) are zero because the sequence vanishes for the cubes of primes. Not so with fifth powers of primes (since 5 is a pentagonal number) so a(32) is nonzero.
MAPLE
A000326inv := proc(n)
local x, a ;
for x from 0 do
a := x*(3*x-1)/2 ;
if a > n then
return -1 ;
elif a = n then
return x;
end if;
end do:
end proc:
A005449inv := proc(n)
local x, a ;
for x from 0 do
a := x*(3*x+1)/2 ;
if a > n then
return -1 ;
elif a = n then
return x;
end if;
end do:
end proc:
A129667 := proc(n)
local a, e1, e2 ;
a := 1 ;
for pe in ifactors(n)[2] do
e1 := A000326inv(op(2, pe)) ;
e2 := A005449inv(op(2, pe)) ;
if e1 >= 0 then
a := a*(-1)^e1 ;
elif e2 >= 0 then
a := a*(-1)^e2 ;
else
a := 0 ;
end if;
end do:
a;
end proc: # R. J. Mathar, Nov 24 2017
MATHEMATICA
a[n_] := a[n] = If[n == 1, 1, -Sum[FiniteAbelianGroupCount[n/d] a[d], {d, Most @ Divisors[n]}]];
Array[a, 100] (* Jean-François Alcover, Feb 16 2020 *)
CROSSREFS
KEYWORD
mult,easy,sign
AUTHOR
Gerard P. Michon, Apr 28 2007, May 01 2007
STATUS
approved