|
|
A065043
|
|
Characteristic function of the numbers with an even number of prime factors (counted with multiplicity): a(n) = 1 if n = A028260(k) for some k then 1 else 0.
|
|
40
|
|
|
1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
G.f.: Sum_{n>=1} a(n)*x^n/(1 - x^n) = Sum_{n>=1} x^(n^2)/(1 - x^n). - Ilya Gutkovskiy, Apr 25 2017
For x, y >= 1, a(x*y) = 1 - abs(a(x)-a(y)).
(End)
|
|
MAPLE
|
if type(numtheory[bigomega](n), 'even') then
1;
else
0;
end if;
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) { for (n=1, 1000, a=1 - bigomega(n)%2; write("b065043.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 04 2009
(Python)
from operator import ixor
from functools import reduce
from sympy import factorint
def A065043(n): return (reduce(ixor, factorint(n).values(), 0)&1)^1 # Chai Wah Wu, Jan 01 2023
|
|
CROSSREFS
|
Cf. A003961, A008836, A010052, A038548 (inverse Möbius transform), A046523, A055037 (partial sums), A343784, A347102, A353337, A353338, A353555, A353557, A353629, A353669, A358750, A358752, A353374, A358775, A356163, A356170.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|