This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A276077 #22 Jan 02 2024 04:41:22 %S A276077 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 A276077 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 A276077 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 A276077 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 A276077 Antti Karttunen, <a href="/A276077/b276077.txt">Table of n, a(n) for n = 1..10000</a> %F A276077 This formula uses Iverson bracket, which gives 1 as its value if the condition given inside [ ] is true and 0 otherwise: %F A276077 a(1) = 0, for n > 1, a(n) = a(A028234(n)) + [A067029(n) > A055396(n)]. %F A276077 Other identities. For all n >= 1: %F A276077 a(A276076(n)) = 0. %F A276077 From _Amiram Eldar_, Sep 30 2023: (Start) %F A276077 Additive with a(p^e) = 1 if primepi(p) < e, and 0 otherwise. %F A276077 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 A276077 For n = 2 (= prime(1)), 2 is not divisible by 2^(1+1), thus a(2) = 0. %e A276077 For n = 3 (= prime(3)), 3 is not divisible by 3^(2+1), thus a(3) = 0. %e A276077 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 A276077 For n = 108 = 2^2 * 3^3, it is divisible both by 2^(1+1) and 3^(2+1), thus a(108) = 2. %e A276077 For n = 625 = prime(3)^4, it is divisible by 5^(3+1), thus a(625) = 1. %t A276077 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 A276077 (Scheme) (define (A276077 n) (if (= 1 n) 0 (+ (A276077 (A028234 n)) (if (> (A067029 n) (A055396 n)) 1 0)))) %o A276077 (Python) %o A276077 from sympy import primepi, isprime, primefactors, factorint %o A276077 def a028234(n): %o A276077 f=factorint(n) %o A276077 return 1 if n==1 else n//(min(f)**f[min(f)]) %o A276077 def a067029(n): %o A276077 f=factorint(n) %o A276077 return 0 if n==1 else f[min(f)] %o A276077 def a049084(n): return primepi(n)*(isprime(n)) %o A276077 def a055396(n): return 0 if n==1 else a049084(min(primefactors(n))) %o A276077 def a(n): %o A276077 if n==1: return 0 %o A276077 val = a(a028234(n)) %o A276077 if a067029(n) > a055396(n): %o A276077 val += 1 %o A276077 return val %o A276077 print([a(n) for n in range(1, 201)]) # _Indranil Ghosh_, Jun 21 2017 %o A276077 (PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, primepi(f[i,1]) < f[i,2]);} \\ _Amiram Eldar_, Sep 30 2023 %Y A276077 Cf. A000720, A028234, A055396, A067029. %Y A276077 Cf. A276078 (positions of zeros), A276079 (nonzeros), also A276076. %Y A276077 Differs from A129251 for the first time at n=625, where a(625) = 1, while A129251(625) = 0. %K A276077 nonn,easy %O A276077 1,108 %A A276077 _Antti Karttunen_, Aug 18 2016