login
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.
11
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, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1
OFFSET
1,108
LINKS
FORMULA
This formula uses Iverson bracket, which gives 1 as its value if the condition given inside [ ] is true and 0 otherwise:
a(1) = 0, for n > 1, a(n) = a(A028234(n)) + [A067029(n) > A055396(n)].
Other identities. For all n >= 1:
a(A276076(n)) = 0.
From Amiram Eldar, Sep 30 2023: (Start)
Additive with a(p^e) = 1 if primepi(p) < e, and 0 otherwise.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} 1/prime(k)^(k+1) = 0.2886971166123417096098... . (End)
EXAMPLE
For n = 2 (= prime(1)), 2 is not divisible by 2^(1+1), thus a(2) = 0.
For n = 3 (= prime(3)), 3 is not divisible by 3^(2+1), thus a(3) = 0.
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.
For n = 108 = 2^2 * 3^3, it is divisible both by 2^(1+1) and 3^(2+1), thus a(108) = 2.
For n = 625 = prime(3)^4, it is divisible by 5^(3+1), thus a(625) = 1.
MATHEMATICA
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 *)
PROG
(Scheme) (define (A276077 n) (if (= 1 n) 0 (+ (A276077 (A028234 n)) (if (> (A067029 n) (A055396 n)) 1 0))))
(Python)
from sympy import primepi, isprime, primefactors, factorint
def a028234(n):
f=factorint(n)
return 1 if n==1 else n//(min(f)**f[min(f)])
def a067029(n):
f=factorint(n)
return 0 if n==1 else f[min(f)]
def a049084(n): return primepi(n)*(isprime(n))
def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
def a(n):
if n==1: return 0
val = a(a028234(n))
if a067029(n) > a055396(n):
val += 1
return val
print([a(n) for n in range(1, 201)]) # Indranil Ghosh, Jun 21 2017
(PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, primepi(f[i, 1]) < f[i, 2]); } \\ Amiram Eldar, Sep 30 2023
CROSSREFS
Cf. A276078 (positions of zeros), A276079 (nonzeros), also A276076.
Differs from A129251 for the first time at n=625, where a(625) = 1, while A129251(625) = 0.
Sequence in context: A219488 A370813 A129251 * A276935 A235127 A358345
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Aug 18 2016
STATUS
approved