%I #22 Jan 02 2024 04:41:22
%S 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,
%T 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,
%U 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,2,0,0,0,1,0,0,0,1,0,0,0,1
%N Number of distinct prime factors p of n such that p^(1+A000720(p)) is a divisor of n, where A000720(p) gives the index of prime p, 1 for 2, 2 for 3, 3 for 5, and so on.
%H Antti Karttunen, <a href="/A276077/b276077.txt">Table of n, a(n) for n = 1..10000</a>
%F This formula uses Iverson bracket, which gives 1 as its value if the condition given inside [ ] is true and 0 otherwise:
%F a(1) = 0, for n > 1, a(n) = a(A028234(n)) + [A067029(n) > A055396(n)].
%F Other identities. For all n >= 1:
%F a(A276076(n)) = 0.
%F From _Amiram Eldar_, Sep 30 2023: (Start)
%F Additive with a(p^e) = 1 if primepi(p) < e, and 0 otherwise.
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/prime(k)^(k+1) = 0.2886971166123417096098... . (End)
%e For n = 2 (= prime(1)), 2 is not divisible by 2^(1+1), thus a(2) = 0.
%e For n = 3 (= prime(3)), 3 is not divisible by 3^(2+1), thus a(3) = 0.
%e For n = 4 (= prime(1)^2), 4 is divisible by 2^(1+1), and there are no other prime factors apart from 2, thus a(4) = 1.
%e For n = 108 = 2^2 * 3^3, it is divisible both by 2^(1+1) and 3^(2+1), thus a(108) = 2.
%e For n = 625 = prime(3)^4, it is divisible by 5^(3+1), thus a(625) = 1.
%t f[p_, e_] := If[PrimePi[p] < e, 1, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Sep 30 2023 *)
%o (Scheme) (define (A276077 n) (if (= 1 n) 0 (+ (A276077 (A028234 n)) (if (> (A067029 n) (A055396 n)) 1 0))))
%o (Python)
%o from sympy import primepi, isprime, primefactors, factorint
%o def a028234(n):
%o f=factorint(n)
%o return 1 if n==1 else n//(min(f)**f[min(f)])
%o def a067029(n):
%o f=factorint(n)
%o return 0 if n==1 else f[min(f)]
%o def a049084(n): return primepi(n)*(isprime(n))
%o def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
%o def a(n):
%o if n==1: return 0
%o val = a(a028234(n))
%o if a067029(n) > a055396(n):
%o val += 1
%o return val
%o print([a(n) for n in range(1, 201)]) # _Indranil Ghosh_, Jun 21 2017
%o (PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, primepi(f[i,1]) < f[i,2]);} \\ _Amiram Eldar_, Sep 30 2023
%Y Cf. A000720, A028234, A055396, A067029.
%Y Cf. A276078 (positions of zeros), A276079 (nonzeros), also A276076.
%Y Differs from A129251 for the first time at n=625, where a(625) = 1, while A129251(625) = 0.
%K nonn,easy
%O 1,108
%A _Antti Karttunen_, Aug 18 2016
|