OFFSET
1,8
COMMENTS
In other words, a(n) is the number of triples of distinct divisors of n in geometric progression.
This sequence is unbounded.
FORMULA
EXAMPLE
The first terms, alongside the corresponding triples, are:
n a(n) (u,v,w)'s
-- ---- ------------------------------------
1 0 None
2 0 None
3 0 None
4 1 (1,2,4)
5 0 None
6 0 None
7 0 None
8 2 (1,2,4), (2,4,8)
9 1 (1,3,9)
10 0 None
11 0 None
12 2 (1,2,4), (3,6,12)
13 0 None
14 0 None
15 0 None
16 4 (1,2,4), (1,4,16), (2,4,8), (4,8,16)
MATHEMATICA
Array[Count[Subsets[#, {3}], _?(#2 / #1 == #3 / #2 & @@ # &)] &@ Divisors@ # &, 87]
PROG
(PARI) a(n) = { my (d=divisors(n), v=0); for (i=1, #d-2, for (j=i+1, #d-1, for (k=j+1, #d, if (d[i]*d[k]==d[j]^2, v++)))); return (v) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jan 21 2023
STATUS
approved