login
A284256
a(n) = number of prime factors of n that are > the square of smallest prime factor of n (counted with multiplicity), a(1) = 0.
9
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 2, 1, 2, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1
OFFSET
1,50
LINKS
FORMULA
If A284252(n) = 1, a(n) = 0, otherwise a(n) = 1 + a(A284253(n)).
a(n) = A001222(A284254(n)).
a(n) = A001222(n) - A284257(n).
EXAMPLE
For n = 10 = 2*5, there is a single prime factor 5 that is > 2^2, thus a(10) = 1.
For n = 15 = 3*5, there are no prime factors larger than 3^2, thus a(15) = 0.
For n = 50 = 2*5*5, the prime factors larger than 2^2 are 5*5, thus a(50) = 2.
MATHEMATICA
Table[If[n == 1, 0, Count[#, d_ /; d > First[#]^2] &@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ n]], {n, 120}] (* Michael De Vlieger, Mar 24 2017 *)
PROG
(Scheme, with memoization-macro definec)
(definec (A284256 n) (if (= 1 (A284252 n)) 0 (+ 1 (A284256 (A284253 n)))))
(PARI) A(n) = if(n<2, return(1), my(f=factor(n)[, 1]); for(i=2, #f, if(f[i]>f[1]^2, return(f[i]))); return(1));
a(n) = if(A(n)==1, 0, 1 + a(n/A(n)));
for(n=1, 150, print1(a(n), ", ")) \\ Indranil Ghosh, after David A. Corneth, Mar 24 2017
(Python)
from sympy import primefactors
def A(n):
pf = primefactors(n)
if pf: min_pf2 = min(pf)**2
for i in pf:
if i > min_pf2: return i
return 1
def a(n): return 0 if A(n)==1 else 1 + a(n//A(n))
print([a(n) for n in range(1, 151)]) # Indranil Ghosh, Mar 24 2017
CROSSREFS
Cf. A251726 (gives the positions of zeros after the initial a(1)=0).
Sequence in context: A316359 A080080 A093662 * A354841 A339772 A250211
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 24 2017
STATUS
approved