OFFSET
0,18
REFERENCES
F. Barrera, B. Recamán and S. Wagon, Problem 12044, Amer. Math. Monthly 125 (2018), p. 466.
LINKS
Freddy Barrera, Table of n, a(n) for n = 0..1000
EXAMPLE
a(11) = 1 because of the ten partitions of 11 into three parts, only 6 + 3 + 2 satisfies the conditions. But a(210) = 0, because 210 does not have any partition that satisfies the conditions.
MATHEMATICA
a[n_] := Length@ Select[ IntegerPartitions[ n, {3}], (t = Sort[GCD @@@ Subsets[#, {2}]]; t[[1]] == 1 && t[[2]] > 1 && t[[3]] > 1) &]; a /@ Range[0, 87] (* Giovanni Resta, Feb 20 2019 *)
PROG
(Sage)
def a(n):
if n < 3: return 0
r = 0
t = [False, True, True]
for p in Partitions(n, length=3, min_part=2, max_slope=-1):
s = sorted(gcd(a, b) > 1 for a, b in Subsets(p, 2))
r += int(s == t)
return r
[a(n) for n in (0..100)]
CROSSREFS
KEYWORD
nonn
AUTHOR
Freddy Barrera, Feb 18 2019
STATUS
approved