login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A369070
a(n) = 1 if there is at least one prime power p^e in the prime factorization of n such that p|e, otherwise 0.
3
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
1
FORMULA
For n >= 1, a(n) <= A342023(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 - Product_{p prime} (1 - (p - 1)/(p*(p^p - 1))) = 0.18824296270011399086... . - Amiram Eldar, Jan 15 2024
MAPLE
a:= n-> `if`(ormap(i-> irem(i[2], i[1])=0, ifactors(n)[2]), 1, 0):
seq(a(n), n=1..124); # Alois P. Heinz, Jan 15 2024
MATHEMATICA
a[n_] := If[AnyTrue[FactorInteger[n], Divisible[Last[#], First[#]] &], 1, 0]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Jan 15 2024 *)
PROG
(PARI) A369070(n) = { my(f=factor(n)); for(i=1, #f~, if(!(f[i, 2]%f[i, 1]), return(1))); (0); };
(SageMath)
def isA369070(n): return any(f[1] % f[0] == 0 for f in factor(n))
print([int(isA369070(n)) for n in range(1, 101)]) # Peter Luschny, Jan 16 2024
CROSSREFS
Characteristic function of A342090.
Cf. A342023.
Sequence in context: A340599 A160753 A328981 * A024360 A025456 A288314
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 15 2024
STATUS
approved