|
|
A359552
|
|
Multiplicative with a(p^e) = 1 if e == 0 mod p, otherwise 0.
|
|
2
|
|
|
1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = [A342014(n) == 0] = [A003415(n) == 0 mod n], where [ ] is the Iverson bracket.
|
|
MATHEMATICA
|
f[p_, e_] := If[Divisible[e, p], 1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 06 2023 *)
|
|
PROG
|
(PARI) A359552(n) = { my(f=factor(n)); prod(i=1, #f~, !(f[i, 2]%f[i, 1])); };
(PARI)
A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
(Python)
from sympy import factorint
def A359552(n): return int(any(map(lambda d:d[1]%d[0], factorint(n).items())))^1 # Chai Wah Wu, Jan 06 2023
|
|
CROSSREFS
|
Characteristic function of A072873.
|
|
KEYWORD
|
nonn,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|