|
|
|
|
0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
(PARI)
A353457(n) = { my(f=factor(n)); prod(i=1, #f~, if(!(primepi(f[i, 1])%2), 1, if(f[i, 2]==1, -1, 0))); };
A353458(n) = { my(f=factor(n)); prod(i=1, #f~, if(primepi(f[i, 1])%2, 1, if(f[i, 2]==1, -1, 0))); };
(Python)
from functools import reduce
from operator import iand
from sympy import factorint, primepi
f = [(primepi(p)&1, int(e==1)) for p, e in factorint(n).items()]
return reduce(iand, (e for p, e in f if not p), 1)^reduce(iand, (e for p, e in f if p), 1) # Chai Wah Wu, Jan 06 2023
|
|
CROSSREFS
|
Characteristic function of A359470.
Differs from A359466 and A359467 for the first time at n=100, as here a(100) = 1.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|