cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A306488 #11 Mar 26 2019 20:15:25
%S A306488 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,
%T A306488 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,
%U A306488 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
%N 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.
%D A306488 F. Barrera, B. Recamán and S. Wagon, Problem 12044, Amer. Math. Monthly 125 (2018), p. 466.
%H A306488 Freddy Barrera, <a href="/A306488/b306488.txt">Table of n, a(n) for n = 0..1000</a>
%e A306488 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.
%t A306488 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 *)
%o A306488 (Sage)
%o A306488 def a(n):
%o A306488     if n < 3: return 0
%o A306488     r = 0
%o A306488     t = [False, True, True]
%o A306488     for p in Partitions(n, length=3, min_part=2, max_slope=-1):
%o A306488         s = sorted(gcd(a, b) > 1 for a, b in Subsets(p, 2))
%o A306488         r += int(s == t)
%o A306488     return r
%o A306488 [a(n) for n in (0..100)]
%K A306488 nonn
%O A306488 0,18
%A A306488 _Freddy Barrera_, Feb 18 2019