OFFSET
1,108
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
This formula uses Iverson bracket, which gives 1 as its value if the condition given inside [ ] is true and 0 otherwise:
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
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Aug 18 2016
STATUS
approved