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-4 of 4 results.

A045917 From Goldbach problem: number of decompositions of 2n into unordered sums of two primes.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Note that A002375 (which differs only at the n = 2 term) is the main entry for this sequence.
The graph of this sequence is called Goldbach's comet. - David W. Wilson, Mar 19 2012
This is the row length sequence of A182138, A184995 and A198292. - Jason Kimberley, Oct 03 2012
The Goldbach conjecture states that a(n) > 0 for n >= 2. - Wolfdieter Lang, May 14 2016
With the second Maple program, the command G(2n) yields all the unordered pairs of prime numbers having sum 2n; caveat: a pair {a,a} is listed as {a}. Example: G(26) yields {{13}, {3,23}, {7,19}}. The command G(100000) yields 810 pairs very fast. - Emeric Deutsch, Jan 03 2017
Conjecture: Let p denote any prime in any decomposition of 2n. 4 and 6 are the only numbers n such that 2n + p is prime for every p. - Ivan N. Ianakiev, Apr 06 2017
Conjecture: For all m >= 0, there exists at least one possible value of n such that a(n) = m. - Ahmad J. Masad, Jan 06 2018
The previous conjecture is related to the sequence A053033. - Ahmad J. Masad, Dec 09 2019
Conjecture: For each k >= 0, there exists a minimum sufficiently large number r that depends on k such that for each n >= r, a(n) > k. - Ahmad J. Masad, Jan 08 2020
Conjecture: If the previous conjecture is true, then for each m >= 0, the number of terms that are equal to (m+1) is larger than the number of terms that are equal to m. - Ahmad J. Masad, Jan 08 2020
Also, the number of equidistant prime pairs in Goldbach's Prime Triangle for integers n > 2. An equidistant prime pair is a pair of not necessarily different prime numbers (p1, p2) that have the same distance d >= 0 from an integer n, i.e., so that p1 = n - d and p2 = n + d. - Jörg Winkelmann, Mar 05 2025

References

  • Calvin C. Clawson, "Mathematical Mysteries, the beauty and magic of numbers," Perseus Books, Cambridge, MA, 1996, Chapter 12, pages 236-257.
  • H. Halberstam and H. E. Richert, 1974, "Sieve methods", Academic press, London, New York, San Francisco.

Crossrefs

Cf. A002375 (the main entry for this sequence (which differs only at the n=2 term)).
Cf. A023036 (first appearance of n), A000954 (last (assumed) appearance of n).

Programs

  • Haskell
    a045917 n = sum $ map (a010051 . (2 * n -)) $ takeWhile (<= n) a000040_list
    -- Reinhard Zumkeller, Sep 02 2013
    
  • Magma
    [#RestrictedPartitions(2*n,2,Set(PrimesInInterval(1,2*n))):n in [1..100]]; // Marius A. Burtea, Jan 23 2020
  • Maple
    A045917 := proc(n)
        local a,i ;
        a := 0 ;
        for i from 1 to n do
            if isprime(i) and isprime(2*n-i) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Jul 01 2013
    # second Maple program:
    G := proc (n) local g, j: g := {}: for j from 2 to (1/2)*n do if isprime(j) and isprime(n-j) then g := `union`(g, {{n-j, j}}) end if end do: g end proc: seq(nops(G(2*n)), n = 1 .. 98); # Emeric Deutsch, Jan 03 2017
  • Mathematica
    f[n_] := Length[Select[2n - Prime[Range[PrimePi[n]]], PrimeQ]]; Table[ f[n], {n, 100}] (* Paul Abbott, Jan 11 2005 *)
    nn = 10^2; ps = Boole[PrimeQ[Range[1,2*nn,2]]]; Join[{0,1}, Table[Sum[ps[[i]] ps[[n-i+1]], {i, Ceiling[n/2]}], {n, 3, nn}]] (* T. D. Noe, Apr 13 2011 *)
  • PARI
    a(n)=my(s);forprime(p=2,n,s+=isprime(2*n-p));s \\ Charles R Greathouse IV, Mar 27 2012
    
  • Python
    from sympy import isprime
    def A045917(n):
        x = 0
        for i in range(2,n+1):
            if isprime(i) and isprime(2*n-i):
                x += 1
        return x # Chai Wah Wu, Feb 24 2015
    

Formula

From Halberstam and Richert: a(n) < (8+0(1))*c(n)*n/log(n)^2 where c(n) = Product_{p>2} (1 - 1/(p-1)^2)*Product_{p|n, p>2} (p-1)/(p-2). It is conjectured that the factor 8 can be replaced by 2. - Benoit Cloitre, May 16 2002
a(n) = ceiling(A035026(n) / 2) = (A035026(n) + A010051(n)) / 2.
a(n) = Sum_{i=2..n} floor(2/Omega(i*(2*n-i))). - Wesley Ivan Hurt, Jan 24 2013
a(n) = A224709(n) + (primepi(2n-2) - primepi(n-1)) + primepi(n) + 1 - n. - Anthony Browne, May 03 2016
a(n) = A224708(2n) - A224708(2n+1) + A010051(n). - Anthony Browne, Jun 26 2016
a(n) = Sum_{k=n*(n-1)/2+2..n*(n+1)/2} A064911(A105020(k-1)). - Wesley Ivan Hurt, Sep 11 2021
a(n) = omega(A362641(n)) = omega(A362640(n)). - Wesley Ivan Hurt, Apr 28 2023

A128076 Triangle T(n,k) = 2*n-k, read by rows.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Feb 14 2007

Keywords

Comments

From Boris Putievskiy, Jan 24 2013: (Start)
Table T(n,k) = n+2*k-2 n, k > 0, read by antidiagonals.
General case A209304. Let m be natural number. The first column of the table T(n,1) is the sequence of the natural numbers A000027. Every next column is formed from previous shifted by m elements.
For m=0 the result is A002260,
for m=1 the result is A002024,
for m=2 the result is A128076,
for m=3 the result is A131914,
for m=4 the result is A209304. (End)

Examples

			First few rows of the triangle are:
1;
3, 2;
5, 4, 3;
7, 6, 5, 4;
9, 8, 7, 6, 5;
...
		

Crossrefs

Cf. A128064, A004736, A000326 (row sums), A003056, A002260, A002024, A131914, A209304, A094727 (rows reversed).

Programs

  • Maple
    A128076 := proc(n,k)
        2*n-k ;
    end proc:
    seq(seq( A128076(n,k),k=1..n),n=1..12) ;# R. J. Mathar, Sep 27 2021
  • Mathematica
    Table[(Round[Sqrt[2 n]]^2 + 3 Round[Sqrt[2 n]] - 2 n)/2, {n, 100}] (* Wesley Ivan Hurt, Sep 19 2021 *)

Formula

Matrix product A128064 * A004736 as infinite lower triangular matrices.
From Boris Putievskiy, Jan 24 2013: (Start)
For the general case:
a(n) = m*A003056 -(m-1)*A002260.
a(n) = m*(t+1) + (m-1)*(t*(t+1)/2-n), where t=floor((-1+sqrt(8*n-7))/2).
For m = 2:
a(n) = 2*A003056 -A002260.
a(n) = 2*(t+1)+(t*(t+1)/2-n), where t=floor((-1+sqrt(8*n-7))/2). (End)
a(n) = (r^2 + 3*r - 2*n)/2, where r = round(sqrt(2*n)). - Wesley Ivan Hurt, Sep 19 2021
a(n) = A105020(n-1)/A002260(n). - Wesley Ivan Hurt, Sep 22 2021

Extensions

NAME simplified. - R. J. Mathar, Sep 27 2021

A228553 Sum of the products formed by multiplying together the smaller and larger parts of each Goldbach partition of 2n.

Original entry on oeis.org

0, 4, 9, 15, 46, 35, 82, 94, 142, 142, 263, 357, 371, 302, 591, 334, 780, 980, 578, 821, 1340, 785, 1356, 1987, 1512, 1353, 2677, 1421, 2320, 4242, 1955, 2803, 4362, 1574, 4021, 5298, 4177, 4159, 6731, 4132, 5593, 9808
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 25 2013

Keywords

Comments

Since the product of each prime pair is semiprime and since we are adding A045917(n) of these, a(n) is expressible as the sum of exactly A045917(n) distinct semiprimes.

Examples

			a(5) = 46. 2*5 = 10 has two Goldbach partitions: (7,3) and (5,5). Taking the products of the larger and smaller parts of these partitions and adding, we get 7*3 + 5*5 = 46.
		

Crossrefs

Programs

  • Maple
    with(numtheory); seq(sum( (2*k*i-i^2) * (pi(i)-pi(i-1)) * (pi(2*k-i)-pi(2*k-i-1)),  i=2..k), k=1..70);
    # Alternative:
    f:= proc(n)
      local S;
      S:= select(t -> isprime(t) and isprime(2*n-t), [seq(i,i=3..n,2)]);
      add(t*(2*n-t),t=S)
    end proc:
    f(2):= 4:
    map(f, [$1..200]); # Robert Israel, Nov 29 2020
  • Mathematica
    c[n_] := Boole[PrimeQ[n]];
    a[n_] := Sum[c[i]*c[2n-i]*i*(2n-i), {i, 2, n}];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 02 2023 *)

Formula

a(n) = Sum_{i=2..n} c(i) * c(2*n-i) * i * (2*n-i), where c = A010051.
a(n) = Sum_{k=(n^2-n+2)/2..(n^2+n-2)/2} c(A105020(k)) * A105020(k), where c = A064911. - Wesley Ivan Hurt, Sep 19 2021

A350419 Irregular table read by rows, where row k lists the semiprimes, s*t (s<=t) in increasing order, where s and t are the smaller and larger parts of the partitions of m = 2k+2 into two parts.

Original entry on oeis.org

4, 9, 15, 9, 21, 25, 35, 33, 49, 15, 39, 55, 65, 77, 51, 91, 21, 57, 85, 121, 95, 119, 143, 25, 69, 133, 169, 115, 187, 161, 209, 221, 87, 247, 33, 93, 145, 253, 289, 35, 155, 203, 299, 323, 217, 361, 39, 111, 319, 391, 185, 341, 377, 437, 123, 259, 403, 129, 205, 493, 529
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 29 2021

Keywords

Comments

The sequence consists of the set {4} UNION {odd semiprimes}. Every odd semiprime in the sequence appears exactly twice since for each partition of m = s + t where s, t are prime, there exists another partition of the form 1 + s*t and vice versa.
If the Goldbach conjecture is true, each row of the table in the example will have at least one Goldbach partition, m = s + t, where s and t are prime. For each odd semiprime that makes its first appearance in the sequence, and thus in some row u = m/2-1 of the table, that semiprime will occur again exactly once in row v = (s*t-1)/2 as the partition 1 + s*t. Likewise, each odd semiprime that makes its second appearance in the sequence will be a partition of some m of the form s + t = 1 + pq in some row v where p and q are (odd) primes. Its first occurrence will appear earlier in row u = (p+q)/2-1 of the table (see example).

Examples

			  Row #  |  m  |   partitions of m = s+t    |   semiprimes k = s*t
-----------------------------------------------------------------------
   1     |  4  |   4 = 2+2 -->              |   2*2 = 4;
   2     |  6  |   6 = 3+3 -->              |   3*3 = 9;
   3     |  8  |   8 = 3+5 -->              |   3*5 = 15;
   4     | 10  |  10 = 1+9 = 3+7 = 5+5 -->  |   1*9 = 9, 3*7 = 21, 5*5 = 25;
   5     | 12  |  12 = 5+7 -->              |   5*7 = 35;
   6     | 14  |  14 = 3+11 = 7+7 -->       |   3*11 = 33, 7*7 = 49;
...
		

Crossrefs

Programs

  • Maple
    T:= n-> select(x-> numtheory[bigomega](x)=2, [seq(s*(2*n+2-s), s=1..n+1)])[]:
    seq(T(n), n=1..22);  # Alois P. Heinz, Dec 31 2021
Showing 1-4 of 4 results.