%I #26 Mar 28 2021 07:01:38
%S 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,
%T 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,
%U 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
%N a(n) = number of prime factors of n that are > the square of smallest prime factor of n (counted with multiplicity), a(1) = 0.
%H Antti Karttunen, <a href="/A284256/b284256.txt">Table of n, a(n) for n = 1..10001</a>
%F If A284252(n) = 1, a(n) = 0, otherwise a(n) = 1 + a(A284253(n)).
%F a(n) = A001222(A284254(n)).
%F a(n) = A001222(n) - A284257(n).
%e For n = 10 = 2*5, there is a single prime factor 5 that is > 2^2, thus a(10) = 1.
%e For n = 15 = 3*5, there are no prime factors larger than 3^2, thus a(15) = 0.
%e For n = 50 = 2*5*5, the prime factors larger than 2^2 are 5*5, thus a(50) = 2.
%t 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 *)
%o (Scheme, with memoization-macro definec)
%o (definec (A284256 n) (if (= 1 (A284252 n)) 0 (+ 1 (A284256 (A284253 n)))))
%o (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));
%o a(n) = if(A(n)==1, 0, 1 + a(n/A(n)));
%o for(n=1, 150, print1(a(n),", ")) \\ _Indranil Ghosh_, after _David A. Corneth_, Mar 24 2017
%o (Python)
%o from sympy import primefactors
%o def A(n):
%o pf = primefactors(n)
%o if pf: min_pf2 = min(pf)**2
%o for i in pf:
%o if i > min_pf2: return i
%o return 1
%o def a(n): return 0 if A(n)==1 else 1 + a(n//A(n))
%o print([a(n) for n in range(1, 151)]) # _Indranil Ghosh_, Mar 24 2017
%Y Cf. A001222, A020639, A284252, A284253, A284254, A284257, A284258, A284259, A284260.
%Y Cf. A251726 (gives the positions of zeros after the initial a(1)=0).
%K nonn
%O 1,50
%A _Antti Karttunen_, Mar 24 2017