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”).

A342023
a(n) = 1 if there is a prime p such that p^p divides n, otherwise 0.
9
0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1
OFFSET
1
FORMULA
a(n) = min(1, A129251(n)) = [A129251(n) > 0], where [ ] is the Iverson bracket.
a(n) = [A342007(n) > 1] = [A327936(n) > 1].
For all n >= 1,
a(n) <= A107078(n), i.e., a(n) = 1 => A107078(n) = 1.
a(n) <= A342024(n), i.e., a(n) = 1 => A342024(n) = 1.
a(n) <= A341999(n), i.e., a(n) = 1 => A341999(n) = 1.
For all n >= 2, a(A003415(n)) = A341996(n).
For all n >= 0, a(A276086(n)) = 0.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 - Product_{p prime} (1 - 1/p^p) = 0.2780097655... . - Amiram Eldar, Jul 24 2022
a(n) = 1 - A359550(n) = A341999(n) - A359546(n). - Antti Karttunen, Jan 06 2023
MATHEMATICA
Array[Function[{D, q}, Boole[Total@ Table[Count[D, _?(IntegerExponent[#, p] == p &)], {p, Prime@ Range@ q}] > 0]] @@ {Divisors[#], PrimePi@ Floor[Sqrt[#]]} &, 120] (* Michael De Vlieger, Mar 11 2021 *)
PROG
(PARI) A342023(n) = if(1==n, 0, my(f = factor(n)); for(k=1, #f~, if(f[k, 2]>=f[k, 1], return(1))); (0));
(Python)
from sympy import factorint
def A342023(n):
f = factorint(n)
for p in f:
if p <= f[p]:
return 1
return 0 # Chai Wah Wu, Mar 09 2021
CROSSREFS
Characteristic function of A100716.
Cf. A003415, A008966, A048103 (positions of zeros), A107078, A276086, A341996, A341999, A327936, A341999, A342004, A342007, A359546, A359550 (one's complement).
Differs from A129251 and A276077 for the first time at n=108, as here a(108) = 1.
Differs from A342024 for the first time at n=625, where a(625)=0, while A342024(625)=1.
Sequence in context: A287372 A188221 A011765 * A342024 A285464 A331282
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 09 2021
STATUS
approved