[go: up one dir, main page]

login
A359768
a(n) = 1 if the parity of n and that of sopfr(n) differ, otherwise 0. Here sopfr is the sum of prime factors (with repetition).
3
1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1
OFFSET
1
FORMULA
a(n) = A000035(A075254(n)) = A000035(A075255(n)).
PROG
(PARI)
A001414(n) = ((n=factor(n))[, 1]~*n[, 2]); \\ From A001414.
A359768(n) = ((A001414(n)+n)%2);
(Python)
from functools import reduce
from sympy import factorint
from operator import ixor
def A359768(n): return (reduce(ixor, (p*e for p, e in factorint(n).items()), 0)^n)&1 # Chai Wah Wu, Jan 15 2023
CROSSREFS
Characteristic function of A036347.
Sequence in context: A361114 A181663 A359370 * A359787 A374119 A247223
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 15 2023
STATUS
approved