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.
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
Keywords
Examples
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.
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
Programs
-
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 *)
-
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)]