login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A121382 Number of ways of writing n as x*y*z, with x <= y <= z and gcd(x,y) = gcd(y,z) = 1. 2

%I #24 Aug 27 2017 23:26:56

%S 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,

%T 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,

%U 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

%N Number of ways of writing n as x*y*z, with x <= y <= z and gcd(x,y) = gcd(y,z) = 1.

%C 3-factor analog of A007875 (number of ways of writing n as x*y, with x <= y and gcd(x,y)=1).

%C a(n) = 1 iff n is a prime power (A000961).

%H Robert Israel, <a href="/A121382/b121382.txt">Table of n, a(n) for n = 1..10000</a> (first 2048 terms from Antti Karttunen)

%e a(4) = 1 because 4 = 1*1*4.

%e a(6) = 2 because 6 = 1*1*6 = 1*2*3.

%e a(24) = 3 because 24 = 1*1*24 = 1*3*8 = 2*3*4.

%e a(30) = 5 because 30 = 1*1*30 = 1*2*15 = 1*3*10 = 1*5*6 = 2*3*5.

%p N:= 1000:

%p A:= Vector(N):

%p for y from 1 to floor(sqrt(N)) do

%p X:= select(t -> igcd(t,y)=1, [$1..y]);

%p Z:= select(t -> igcd(t,y)=1, [$y..N/y]);

%p for x in X do

%p for z in Z while x*y*z <= N do

%p A[x*y*z]:= A[x*y*z]+1

%p od od:

%p od:

%p convert(A,list); # _Robert Israel_, Aug 27 2017

%t 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 *)

%o (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

%Y Cf. A000040, A001248, A001358, A007304, A007875, A030078.

%Y First occurrence of k: A122829.

%K easy,nonn

%O 1,6

%A _Jonathan Vos Post_, Sep 06 2006

%E Edited, corrected and extended by _Robert G. Wilson v_, Sep 11 2006

%E Name clarified by _Antti Karttunen_, Aug 27 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 10:29 EDT 2024. Contains 371905 sequences. (Running on oeis4.)