login
A365605
Characteristic function of numbers without an inferior odd divisor > 1.
2
1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0
OFFSET
1
COMMENTS
We define a divisor d|n to be inferior if d*d <= n.
LINKS
FORMULA
a(p) = 1, for p prime.
EXAMPLE
The divisors > 1 of 14 are {2, 7, 14} of which {2, 14} are even and 7 is not inferior, hence a(14)=1.
The divisors > 1 of 15 are {3, 5, 15} of which 3 is odd and inferior, hence a(15)=0.
MATHEMATICA
a[n_]:=If[Select[Divisors[n]//Rest, OddQ[#]&&#<=n/#&]=={}, 1, 0]; Array[a, 100] (* Stefano Spezia, Sep 13 2023 after Gus Wiseman in A342081 *)
PROG
(PARI) a(n) = { my(P=factor(n)[, 1]); sum(i=1, #P, P[i]>2 && P[i]*P[i]<=n)==0 }
(PARI) a(n) = sumdiv(n, d, if ((d%2) && (d>1), d^2 <= n)) == 0; \\ Michel Marcus, Sep 14 2023
CROSSREFS
Characteristic function of A342081.
Sequence in context: A328306 A267256 A351824 * A365716 A334460 A071023
KEYWORD
nonn
AUTHOR
Christian Krause, Sep 11 2023
STATUS
approved