OFFSET
0
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..100000
FORMULA
Multiplicative with a(p^e) = [e < p], where [ ] is the Iverson bracket.
a(n) = 1 - A342023(n).
Sum_{k=1..n} a(k) ~ c * n, where c = Product_{p prime} (1 - 1/p^p) = 0.7219902344... . - Amiram Eldar, Jan 07 2023
EXAMPLE
a(0) = 0 because 0 is a multiple of all numbers, including also all numbers of the form p^p, with p prime.
MATHEMATICA
f[p_, e_] := If[e < p, 1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 06 2023 *)
PROG
(PARI) A359550(n) = if(!n, n, my(f = factor(n)); prod(k=1, #f~, (f[k, 2]<f[k, 1])));
(PARI) A359550(n) = { my(pp); forprime(p=2, , pp = p^p; if(!(n%pp), return(0)); if(pp > n, return(1))); }; \\ Antti Karttunen, Nov 13 2024
(Python)
from sympy import factorint
def A359550(n): return int(all(map(lambda d:d[0]>d[1], factorint(n).items()))) # Chai Wah Wu, Jan 06 2023
CROSSREFS
KEYWORD
nonn,mult,changed
AUTHOR
Antti Karttunen, Jan 06 2023
EXTENSIONS
Term a(0)=0 prepended and name edited accordingly - Antti Karttunen, Nov 13 2024
STATUS
approved