A050320 Number of ways n is a product of squarefree numbers > 1.
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 5, 1, 1, 2, 2, 2, 3, 1, 2, 2, 2, 1, 5, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 6, 1, 2, 2, 1, 2, 5, 1, 2, 2, 5, 1, 3, 1, 2, 2, 2, 2, 5, 1, 2, 1, 2, 1, 6, 2, 2, 2, 2, 1, 6, 2, 2, 2, 2, 2, 2, 1, 2, 2, 3, 1, 5, 1
Offset: 1
Examples
For n = 36 we have three choices as 36 = 2*2*3*3 = 6*6 = 2*3*6 (but no factorizations with factors 4, 9, 12, 18 or 36 are allowed), thus a(36) = 3. - _Antti Karttunen_, Oct 21 2017
Links
- Giovanni Resta, Table of n, a(n) for n = 1..10000
- Kevin Broughan, Quadrafree factorisatio numerorum, Rocky Mountain J. Math. 44 (3) (2014) 791-807.
- Index entries for sequences computed from exponents in factorization of n
Crossrefs
Programs
-
Haskell
a050320 n = h n $ tail $ a206778_row n where h 1 _ = 1 h _ [] = 0 h m fs'@(f:fs) = if f > m then 0 else if r > 0 then h m fs else h m' fs' + h m fs where (m', r) = divMod m f -- Reinhard Zumkeller, Dec 16 2013
-
Mathematica
sub[w_, e_] := Block[{v = w}, v[[e]]--; v]; ric[w_, k_] := If[Max[w] == 0, 1, Block[{e, s, p = Flatten@Position[Sign@w, 1]}, s = Select[Prepend[#, First@p] & /@ Subsets[Rest@p], Total[1/2^#] <= k &]; Sum[ric[sub[w, e], Total[1/2^e]], {e, s}]]]; sig[w_] := sig[w] = ric[w, 1]; a[n_] := sig@ Sort[Last /@ FactorInteger[n]]; Array[a, 103] (* Giovanni Resta, May 21 2013 *) sqfacs[n_]:=If[n<=1,{{}},Join@@Table[(Prepend[#,d]&)/@Select[sqfacs[n/d],Min@@#>=d&],{d,Select[Rest[Divisors[n]],SquareFreeQ]}]] Table[Length[sqfacs[n]],{n,100}] (* Gus Wiseman, Aug 20 2020 *)
Formula
Dirichlet g.f.: Product_{n is squarefree and > 1} (1/(1-1/n^s)).
Comments