login
A121382
Number of ways of writing n as x*y*z, with x <= y <= z and gcd(x,y) = gcd(y,z) = 1.
2
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 1, 2, 1, 5, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 5, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 7, 1, 2, 2, 1, 2, 5, 1, 2, 2, 5, 1, 2, 1, 2, 2, 2, 2, 5, 1, 3, 1, 2, 1, 6, 2, 2, 2, 2, 1, 6, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 1, 5, 1, 2, 5
OFFSET
1,6
COMMENTS
3-factor analog of A007875 (number of ways of writing n as x*y, with x <= y and gcd(x,y)=1).
a(n) = 1 iff n is a prime power (A000961).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000 (first 2048 terms from Antti Karttunen)
EXAMPLE
a(4) = 1 because 4 = 1*1*4.
a(6) = 2 because 6 = 1*1*6 = 1*2*3.
a(24) = 3 because 24 = 1*1*24 = 1*3*8 = 2*3*4.
a(30) = 5 because 30 = 1*1*30 = 1*2*15 = 1*3*10 = 1*5*6 = 2*3*5.
MAPLE
N:= 1000:
A:= Vector(N):
for y from 1 to floor(sqrt(N)) do
X:= select(t -> igcd(t, y)=1, [$1..y]);
Z:= select(t -> igcd(t, y)=1, [$y..N/y]);
for x in X do
for z in Z while x*y*z <= N do
A[x*y*z]:= A[x*y*z]+1
od od:
od:
convert(A, list); # Robert Israel, Aug 27 2017
MATHEMATICA
f[n_] := Block[{d = Divisors@n, m = DivisorSigma[0, n], s = {}}, If[m == 2, 1, Do[ AppendTo[s, {d[[p]], d[[q]], d[[r]]}], {r, m}, {q, r}, {p, q}]; Length@ Select[s, Times @@ # == n && GCD[ #[[1]], #[[2]]] == GCD[ #[[2]], #[[3]]] == 1 &]]]; Array[f, 105] (* Robert G. Wilson v, Sep 11 2006 *)
PROG
(PARI) A121382(n) = { my(s=0); fordiv(n, x, for(y=x, n, for(z=y, n, if((x*y*z==n)&&(1==gcd(x, y))&&(1==gcd(y, z)), s++)))); (s); }; \\ Antti Karttunen, Aug 27 2017
CROSSREFS
First occurrence of k: A122829.
Sequence in context: A333175 A294893 A336570 * A305150 A351202 A374959
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Sep 06 2006
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v, Sep 11 2006
Name clarified by Antti Karttunen, Aug 27 2017
STATUS
approved