A331591 a(n) is the number of distinct prime factors of A225546(n), or equally, number of distinct prime factors of A293442(n).
0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1
Offset: 1
Keywords
Examples
From _Peter Munn_, Jan 28 2020: (Start) The factorization of 6 into powers of squarefree numbers with distinct exponents that are powers of 2 is 6 = 6^(2^0) = 6^1, which has 1 term. So a(6) = 1. Similarly, 40 = 10^(2^0) * 2^(2^1) = 10^1 * 2^2 = 10 * 4, which has 2 terms. So a(40) = 2. Similarly, 320 = 5^(2^0) * 2^(2^1) * 2^(2^2) = 5^1 * 2^2 * 2^4 = 5 * 4 * 16, which has 3 terms. So a(320) = 3. 10^100 (a googol) factorizes in this way as 10^4 * 10^32 * 10^64. So a(10^100) = 3. (End)
Links
Crossrefs
Programs
-
Mathematica
Array[PrimeNu@ If[# == 1, 1, Times @@ Flatten@ Map[Function[{p, e}, Map[Prime[Log2@ # + 1]^(2^(PrimePi@ p - 1)) &, DeleteCases[NumberExpand[e, 2], 0]]] @@ # &, FactorInteger[#]]] &, 105] (* Michael De Vlieger, Jan 24 2020 *) f[e_] := Position[Reverse[IntegerDigits[e, 2]], 1] // Flatten; a[n_] := CountDistinct[Flatten[f /@ FactorInteger[n][[;; , 2]]]]; a[1] = 0; Array[a, 100] (* Amiram Eldar, Dec 23 2023 *)
-
PARI
A331591(n) = if(1==n,0,my(f=factor(n),u=#binary(vecmax(f[, 2])),xs=vector(u),m=1,e); for(i=1,u,for(k=1,#f~, if(bitand(f[k,2],m),xs[i]++)); m<<=1); #select(x -> (x>0),xs));
-
PARI
A331591(n) = if(1==n, 0, hammingweight(fold(bitor, factor(n)[, 2]))); \\ Antti Karttunen, Feb 05 2020
-
PARI
A331591(n) = if(n==1, 0, (core(n)>1) + A331591(core(n,1)[2])) \\ Peter Munn, Mar 08 2022
Formula
From Peter Munn, Jan 28 2020: (Start)
For m >= 2, a(A005117(m)) = 1.
a(n^2) = a(n).
(End)
From Peter Munn, Mar 07 2022: (Start)
a(n) <= A299090(n).
(End)
Comments