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.

Showing 1-7 of 7 results.

A141100 Number of unordered pairs of odd composite numbers that sum to 2n.

Original entry on oeis.org

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

Views

Author

T. D. Noe, Jun 02 2008, Jun 05 2008

Keywords

Comments

See A141099 for pairs of odd nonprime numbers. We have a(n) > 0 except for the 14 values of 2n given in A118081.

Examples

			a(18)=2 because 36 = 9+27 = 15+21.
		

Crossrefs

Programs

  • Mathematica
    Table[cnt=0; Do[If[ !PrimeQ[i] && !PrimeQ[2n-i], cnt++ ], {i,3,n,2}]; cnt, {n,100}]

Formula

a(n) = 1 - floor(n/2) + Sum_{i=3..n} c(i) * c(2n-i), n>1, where c = A005171. - Wesley Ivan Hurt, Dec 27 2013

A141097 Number of unordered pairs of coprime composite numbers that sum to 2n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 2, 0, 1, 3, 0, 1, 0, 0, 3, 3, 0, 0, 3, 0, 3, 2, 0, 3, 4, 0, 1, 2, 1, 4, 5, 0, 0, 3, 1, 5, 5, 0, 4, 6, 0, 5, 2, 0, 7, 6, 0, 0, 9, 2, 8, 8, 0, 6, 4, 1, 8, 4, 1, 9, 9, 1, 4, 10, 2, 8, 11, 0, 3, 11, 3, 10, 4, 2, 12, 8, 1, 4, 13, 2
Offset: 1

Views

Author

T. D. Noe, Jun 02 2008

Keywords

Comments

See A141095 for pairs of coprime nonprime numbers. It appears that a(n) > 0 except for the 43 values of 2n given in A141098. Roberts says that A. M. Vaidya proved that a(n) > 0 for all sufficiently large n.

Examples

			a(17)=1 because 34 = 9+25.
		

References

  • Joe Roberts, "Lure of the Integers", The Mathematical Association of America, 1992, p. 190.

Crossrefs

Programs

  • Mathematica
    Table[cnt=0; Do[If[GCD[2n-i,i]==1 && !PrimeQ[i] && !PrimeQ[2n-i], cnt++ ], {i,3,n,2}]; cnt, {n,100}]

A141099 Number of unordered pairs of odd nonprime numbers that sum to 2n.

Original entry on oeis.org

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

Views

Author

T. D. Noe, Jun 02 2008, Jun 05 2008

Keywords

Comments

See A141100 for pairs of odd composite numbers. We have a(n) > 0 except for the 8 values of 2n given in A046458.

Examples

			a(18)=3 because 36 = 1+35 = 9+27 = 15+21.
		

Crossrefs

Programs

  • Mathematica
    Table[cnt=0; Do[If[ !PrimeQ[i] && !PrimeQ[2n-i], cnt++ ], {i,1,n,2}]; cnt, {n,100}]

A141096 Even numbers not representable as the sum of two coprime nonprime numbers.

Original entry on oeis.org

4, 6, 8, 12, 14, 18, 20, 24, 30, 32, 38, 42, 48, 54, 60, 72, 80, 84, 90, 108, 110, 132, 138, 140, 150, 180
Offset: 1

Views

Author

T. D. Noe, Jun 02 2008

Keywords

Comments

Numbers k such that A141095(k/2) = 0.
180 is the last term.
This sequence is a subsequence of A141098.

Crossrefs

Programs

  • Mathematica
    t = Table[Length[Select[Range[n/2], ! PrimeQ[#] && ! PrimeQ[n - #] && GCD[#, n - #] == 1 &]], {n, 2, 2000, 2}]; Flatten[2*Position[t, 0]] (* T. D. Noe, Dec 05 2013 *)

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

Views

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

A232721 Numbers not representable as the sum of two coprime nonprime numbers.

Original entry on oeis.org

1, 3, 4, 6, 8, 12, 14, 18, 20, 24, 30, 32, 38, 42, 48, 54, 60, 72, 80, 84, 90, 108, 110, 132, 138, 140, 150, 180
Offset: 1

Views

Author

Irina Gerasimova, Nov 28 2013

Keywords

Comments

Numbers n such that A185279(n) = 0. 1 and 3 together with A141096.

Crossrefs

Programs

  • Mathematica
    t = Table[Length[Select[Range[n/2], ! PrimeQ[#] && ! PrimeQ[n - #] && GCD[#, n - #] == 1 &]], {n, 2000}]; Flatten[Position[t, 0]] (* T. D. Noe, Dec 05 2013 *)

A363992 The number of ways 2n can be expressed as the sum of an odd prime number and an odd nonprime, both of which are relatively prime to n.

Original entry on oeis.org

0, 0, 1, 1, 1, 0, 1, 2, 1, 1, 2, 2, 1, 3, 3, 1, 6, 3, 1, 8, 4, 2, 6, 6, 3, 5, 7, 4, 8, 8, 2, 12, 7, 3, 13, 6, 6, 11, 9, 4, 12, 12, 4, 13, 13, 3, 14, 14, 8, 17, 11, 7, 15, 15, 10, 14, 13, 7, 16, 18, 3, 22, 18, 7, 24, 14, 11, 20, 20, 14, 17, 18, 10, 22, 22, 8
Offset: 0

Views

Author

Brian Darrow, Jr., Jun 30 2023

Keywords

Examples

			For n=24 (2n=48), we have a(24)=3 since 48=1+47, 48=13+35, and 48=23+25. These are the only sums containing one prime and one nonprime, both of which are relatively prime to n.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
       nops(select(k -> igcd(n,k) = 1 and igcd(n,2*n-k) = 1 and isprime(k) and not isprime(2*n-k), [seq(k,k=1..2*n-1,2)]))
    end proc:
    map(f, [$0..100]); # Robert Israel, Jul 03 2023
  • Sage
    def d(a):
        """
        This function returns the number of ways n=2a can be expressed as the sum of one prime number and an odd composite that are relatively prime to n
        """
        d=0
        for i in range(1,a+1):
            if ((is_prime(i) and not is_prime(2*a-i) and gcd(i,2*a-i) == 1)) or ((not is_prime(i) and is_prime(2*a-i) and gcd(i,2*a-i) == 1)):
                d=d+1
        return d
Showing 1-7 of 7 results.