OFFSET
1,12
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..3003
FORMULA
a(n) = 1 iff n has 3 or 4 divisors (A323644) (see examples). - Bernard Schott, Dec 13 2021
a(n) = 2 if n = p^2*q, p<q primes (A096156) or n = p^4 (A030514) (see examples). - Bernard Schott, Dec 16 2021
EXAMPLE
n=12: (1,2,6), (1,3,4): therefore a(12)=2;
n=18: (1,2,9), (1,3,6), (2,3,3): therefore a(18)=3.
For n = p*q, p < q primes: n = 1 * p * q, so a(n) = 1.
For n = p^2, p prime: n = 1 * p * p, so a(n) = 1.
For n = p^3, p prime: n = 1 * p * p^2, so a(n) = 1.
For n = p*q^2, p < q < p^2: n = 1 * p * pq = 1* q * p^2, so a(n) = 2 (see n=12).
For n = p*q^2, p < p^2 < q: n = 1 * p * pq = 1 * p^2 * q, so a(n) = 2
For n = p^4, p prime: n = 1 * p * p^3 = 1 * p^2 * p^2, so a(n) = 2.
MATHEMATICA
a[n_] := Module[{s = 0}, Do[Do[Do[If[u v w == n, s++], {w, v, n}], {v, u + 1, n - 1}], {u, Divisors[n]}]; s];
Array[a, 120] (* Jean-François Alcover, Dec 10 2021, after Antti Karttunen *)
PROG
(PARI) A088432(n) = { my(s=0); fordiv(n, u, for(v=u+1, n-1, for(w=v, n, if(u*v*w==n, s++)))); (s); }; \\ Antti Karttunen, Aug 24 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 01 2003
EXTENSIONS
Data section extended to 120 terms by Antti Karttunen, Aug 24 2017
STATUS
approved