OFFSET
1
COMMENTS
Characteristic function for A268335.
LINKS
FORMULA
MATHEMATICA
Array[Boole[AllTrue[FactorInteger[#][[All, -1]], OddQ]] &, 120] (* Michael De Vlieger, Nov 23 2017 *)
PROG
(PARI)
vecproduct(v) = { my(m=1); for(i=1, #v, m *= v[i]); m; };
A295316(n) = vecproduct(apply(e -> (e%2), factorint(n)[, 2]));
(Scheme, with memoization-macro definec)
(Python)
from sympy import factorint
def A295316(n): return int(all(map(lambda m:m&1, factorint(n).values()))) # Chai Wah Wu, Jan 04 2023
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Nov 23 2017
STATUS
approved