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.

User: Jason Holland

Jason Holland's wiki page.

Jason Holland has authored 4 sequences.

A198255 Number of ways to write n as the sum of two coprime squarefree semiprimes.

Original entry on oeis.org

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, 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, 2, 0, 3, 0, 4, 1, 0, 1, 3, 0, 5, 0, 2, 0, 4, 0, 1, 2, 2, 0, 3, 0, 4, 2, 2, 1, 3, 0, 6, 1, 2, 0, 6
Offset: 1

Author

Jason Holland, Oct 22 2011

Keywords

Comments

This sequence is term by term less than or equal to A197629. The first odd term where the inequality is strict is the 97th term. The first even term that is strictly less than A197629 is the 248th term.
There are interesting bands in the scatterplot of this sequence. - Antti Karttunen, Sep 23 2018

Examples

			Same as A197629 until a(97) since 97=(2)(3)(7)+(5)(11) and thus the value of the 97th term of A197629 is one greater.  The 248th term of A197629 is the first even term which is one greater since 248=(3)(5)(7)+(11)(13).
From _Antti Karttunen_, Sep 23 2018: (Start)
For n = 97 there are following six solutions: 97 = 6+91 = 10+87 = 15+82 = 35+62 = 39+58 = 46+51, thus a(97) = 6.
For n = 248 there are following seven solutions: 248 = 33+215 = 35+213 = 39+209 = 65+183 = 87+161 = 115+133 = 119+129, thus a(248) = 7.
(End)
		

Crossrefs

Cf. A197629.

Programs

  • MATLAB
    function [asubn] = sps(n)
    % Returns the number of coprime, squarefree, semiprime, partitions a+b of n.
    r = 0; % r is the number of sps's of n
    k=6;
    while k < n/2,
        if gcd(k,n-k)==1
             if length(factor(k)) == 2
                 if length(factor(n-k)) == 2
                     if prod(diff(factor(k)))*prod(diff(factor(n-k))) > 0
                        r = r + 1;
                     end
                 end
             end
        end
        k = k + 1;
    end
    asubn = r;
    end
    
  • PARI
    A198255(n) = sum(k=4, (n-1)\2, gcd(k, n-k)==1&&(2==bigomega(k))&&(2==bigomega(n-k))&&issquarefree(k)&&issquarefree(n-k)); \\ Antti Karttunen, Sep 23 2018, after Charles R Greathouse IV's program for A197629

A197640 Numbers not representable as the sum of two coprime, squarefree, composite, positive integers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 56, 58, 60, 62, 63, 64, 66, 70, 72, 75, 78, 80, 82, 84, 88, 90, 96, 100, 102, 105, 108, 110, 114, 120, 126, 130, 132, 138, 140, 144, 150, 156, 168, 180, 190, 204, 210, 240, 270, 330, 420
Offset: 1

Author

Jason Holland, Oct 16 2011

Keywords

Comments

a(87) = 420 is probably the last term.

Crossrefs

Programs

  • PARI
    is(n)=for(k=6,n\2,if(gcd(k,n-k)==1&&!isprime(k)&&!isprime(n-k)&&issquarefree(k)&&issquarefree(n-k),return(0)));1 \\ Charles R Greathouse IV, Oct 18 2011

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

Original entry on oeis.org

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, 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, 2, 0, 3, 0, 4, 1, 0, 1, 3, 0, 5, 0, 2, 0, 4, 0, 1, 2
Offset: 1

Author

Jason Holland, Oct 16 2011

Keywords

Examples

			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).
		

Crossrefs

Cf. A185279.

Programs

  • MATLAB
    function [asubn]=ccsf(n)
    % ccsf(n) returns the n-th term of the sequence of composite, coprime, square
    % free sums of the integer n
    r=0;
    k=6;
    while k0
    r = r+1;
    end
    end
    end
    k=k+1;
    end
    asubn=r;
    end
    
  • 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

A185279 a(n) = number of ways that one can write n as the sum of two positive integers such that i) the integers are relatively prime to n but ii) the integers are not themselves prime.

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 2, 0, 3, 0, 1, 1, 3, 0, 3, 1, 1, 1, 5, 0, 6, 0, 2, 2, 3, 1, 7, 0, 3, 1, 8, 0, 9, 1, 1, 2, 9, 0, 8, 1, 3, 2, 11, 0, 7, 1, 4, 3, 13, 0, 14, 1, 3, 4, 8, 1, 15, 1, 6, 1, 16, 0, 17, 3, 2, 4, 11, 1, 18, 0, 7, 4, 19, 0
Offset: 1

Author

Jason Holland, Feb 19 2011

Keywords

Comments

These might be called "relative Goldbach partitions."
This sequence was first discovered by my student Houston Hutchinson.
We became interested in this sequence when looking at Goldbach Partitions thus at first we only considered the even numbered terms. The graph of the even values of a(n) looks like Goldbach's comet except with an exponential appearance rather than a logarithmic appearance. We give a formula for the even values in the formula section.
Sequence A141095 has the terms for even n.

Examples

			a(34) is the first even term with value greater than 1.  The number 34 = 33 + 1 and 25 + 9.  The latter sums meet the requirements listed in the definition. For odd n greater than 3, a(n) will always be at least 1 since 1 + (n - 1) is a sum that satisfies the definition.  For example a(5) = 1 since 5 = 1 + 4.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[n/2], ! PrimeQ[#] && ! PrimeQ[n - #] && GCD[#, n - #] == 1 &]], {n, 100}] (* T. D. Noe, Dec 05 2013 *)
  • Sage
    def A185279(n):
        return sum(1 for i in (1..n//2) if all(gcd(j,n) == 1 and not is_prime(j) for j in (i, n-i))) # D. S. McNeil, Mar 05 2011

Formula

For even n >= 4, denote the number of Goldbach partitions that have distinct primes by g(n), denote the totient of n by t(n), and denote the primes less than n that are NOT factors of n by p(n). Then a(n) = g(n)- p(n) + t(n)/2.
a(n) = Sum_{i=1..floor(n/2)} [GCD(i, n-i) = 1] * c(i) * c(n-i), where c is the characteristic function of nonprimes (A005171) and [ ] is the Iverson bracket. - Wesley Ivan Hurt, Dec 08 2020