login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A349125 Dirichlet inverse of A064989, where A064989 is multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p. 9
1, -1, -2, 0, -3, 2, -5, 0, 0, 3, -7, 0, -11, 5, 6, 0, -13, 0, -17, 0, 10, 7, -19, 0, 0, 11, 0, 0, -23, -6, -29, 0, 14, 13, 15, 0, -31, 17, 22, 0, -37, -10, -41, 0, 0, 19, -43, 0, 0, 0, 26, 0, -47, 0, 21, 0, 34, 23, -53, 0, -59, 29, 0, 0, 33, -14, -61, 0, 38, -15, -67, 0, -71, 31, 0, 0, 35, -22, -73, 0, 0, 37, -79 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(1) = 1; a(n) = -Sum_{d|n, d < n} A064989(n/d) * a(d).
a(n) = A349126(n) - A064989(n).
Multiplicative with a(p^e) = 0 if e > 1, -1 if p = 2 and -prevprime(p) otherwise. - Sebastian Karlsson, Nov 13 2021
a(n) = A008683(n) * A064989(n). [Because A064989 is fully multiplicative. See "Properties" section in the Wikipedia article]
MATHEMATICA
f[p_, e_] := If[e == 1, If[p == 2, -1, -NextPrime[p, -1]], 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 13 2021 *)
PROG
(PARI)
A064989(n) = { my(f = factor(n)); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f); };
A349125(n) = (moebius(n)*A064989(n));
(PARI) A349125(n) = { my(f = factor(n)); prod(i=1, #f~, if(1<f[i, 2], 0, if(2==f[i, 1], -1, -precprime(f[i, 1]-1)))); }; \\ (After Karlsson's multiplicative formula)
(Python)
from sympy import prevprime, factorint, prod
def f(p, e):
return 0 if e > 1 else -1 if p == 2 else -prevprime(p)
def a(n):
return prod(f(p, e) for p, e in factorint(n).items()) # Sebastian Karlsson, Nov 13 2021
CROSSREFS
Cf. also A055615, A346234, A349134.
Sequence in context: A279591 A279675 A169646 * A231117 A021496 A241830
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Nov 13 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 05:37 EDT 2024. Contains 371906 sequences. (Running on oeis4.)