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.

A197629 Number of ways to write n as the sum of two coprime, squarefree, composite, positive integers.

This page as a plain text file.
%I A197629 #15 Apr 25 2016 12:05:03
%S A197629 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,
%T A197629 0,0,1,0,0,0,2,0,2,0,0,0,2,0,2,0,0,0,2,0,1,0,1,0,2,0,5,0,0,0,1,0,3,1,
%U A197629 2,0,3,0,4,1,0,1,3,0,5,0,2,0,4,0,1,2
%N A197629 Number of ways to write n as the sum of two coprime, squarefree, composite, positive integers.
%H A197629 Charles R Greathouse IV, <a href="/A197629/b197629.txt">Table of n, a(n) for n = 1..10000</a>
%e A197629 a(29) is the first nonzero term since 29=15+14. The first nonzero even term is a(68) since 68=3(11)+5(7). Then the first even term with a value greater than one is a(86) since 86=3(7)+5(13) and 86=5(7)+3(17).
%o A197629 (MATLAB)
%o A197629 function [asubn]=ccsf(n)
%o A197629 % ccsf(n) returns the n-th term of the sequence of composite, coprime, square
%o A197629 % free sums of the integer n
%o A197629 r=0;
%o A197629 k=6;
%o A197629 while k<n/2,
%o A197629 if isprime(k)+isprime(n-k) == 0
%o A197629 if gcd(k,n-k) == 1
%o A197629 if prod(diff(factor(k)))*prod(diff(factor(n-k)))>0
%o A197629 r = r+1;
%o A197629 end
%o A197629 end
%o A197629 end
%o A197629 k=k+1;
%o A197629 end
%o A197629 asubn=r;
%o A197629 end
%o A197629 (PARI) a(n)=sum(k=4,(n-1)\2,gcd(k,n-k)==1&&!isprime(k)&&!isprime(n-k)&&issquarefree(k)&&issquarefree(n-k)) \\ _Charles R Greathouse IV_, Oct 18 2011
%Y A197629 Cf. A185279.
%K A197629 nonn
%O A197629 1,41
%A A197629 _Jason Holland_, Oct 16 2011