|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,50
|
|
LINKS
|
|
|
FORMULA
|
|
|
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)
(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)));
(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))
|
|
CROSSREFS
|
Cf. A251726 (gives the positions of zeros after the initial a(1)=0).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|