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!)
A351619 a(n) = Sum_{p|n, p prime} (-1)^p. 2
0, 1, -1, 1, -1, 0, -1, 1, -1, 0, -1, 0, -1, 0, -2, 1, -1, 0, -1, 0, -2, 0, -1, 0, -1, 0, -1, 0, -1, -1, -1, 1, -2, 0, -2, 0, -1, 0, -2, 0, -1, -1, -1, 0, -2, 0, -1, 0, -1, 0, -2, 0, -1, 0, -2, 0, -2, 0, -1, -1, -1, 0, -2, 1, -2, -1, -1, 0, -2, -1, -1, 0, -1, 0, -2, 0, -2, -1, -1, 0, -1, 0, -1, -1, -2, 0, -2, 0, -1, -1, -2, 0, -2, 0, -2, 0, -1, 0, -2, 0, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,15
LINKS
FORMULA
G.f.: Sum_{k>=1} (-x)^prime(k)/(1 - x^prime(k)).
a(n) = -A001221(n) if n is odd and a(n) = 2 - A001221(n) if n is even. - Chai Wah Wu, Mar 02 2022
PROG
(PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, (-1)^f[k, 1]);
(PARI) my(N=99, x='x+O('x^N)); concat(0, Vec(sum(k=1, N, isprime(k)*(-x)^k/(1-x^k))))
(Python)
from sympy import primefactors
def A351619(n): return (0 if n%2 else 2) - len(primefactors(n)) # Chai Wah Wu, Mar 02 2022
CROSSREFS
Sequence in context: A131963 A130538 A276007 * A078659 A079690 A328620
KEYWORD
sign
AUTHOR
Seiichi Manyama, Mar 02 2022
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 March 28 16:12 EDT 2024. Contains 371254 sequences. (Running on oeis4.)