login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A306488
Number of ways of expressing n as a + b + c, with a, b, and c positive integers, gcd(a, b) = 1, but gcd(a, c) and gcd(b, c) both greater than 1.
1
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 9, 0, 7, 1, 4, 1, 15, 0, 13, 1, 4, 2, 16, 0, 24, 4, 10, 1, 29, 0, 32, 4, 5, 3, 41, 0, 38, 2, 17, 6, 54, 1, 43, 6, 26, 10, 70, 0, 65, 9, 20, 11, 68, 1, 86, 14, 35, 2, 99, 1, 99, 15, 18, 16, 104, 1, 125, 10, 53, 19, 134, 0, 114, 21, 58
OFFSET
0,18
REFERENCES
F. Barrera, B. Recamán and S. Wagon, Problem 12044, Amer. Math. Monthly 125 (2018), p. 466.
LINKS
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
Sequence in context: A028618 A147986 A147988 * A230031 A019920 A246130
KEYWORD
nonn
AUTHOR
Freddy Barrera, Feb 18 2019
STATUS
approved