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

A187619 Sum of the differences of the parts in each Goldbach partition of 2n, A187129(n) - A185297(n).

Original entry on oeis.org

0, 0, 2, 4, 2, 8, 16, 12, 20, 28, 26, 32, 24, 28, 32, 64, 60, 24, 58, 72, 86, 88, 122, 116, 78, 128, 98, 108, 144, 80, 202, 204, 60, 184, 216, 188, 226, 292, 168, 196, 316, 260, 168, 376, 236, 216, 334, 120, 304, 408, 278, 340, 472, 392, 454, 604, 452, 372, 724, 216, 330, 580, 162, 472, 542, 392, 366, 540, 470, 592, 838, 384, 390, 828
Offset: 2

Views

Author

N. J. A. Sloane, Mar 12 2011

Keywords

Crossrefs

Cf. A226237 (Sum of sums), A045917.

Programs

  • Maple
    with(numtheory):
    A279725:=n->2*add( (pi(i)-pi(i-1)) * (pi(2*n-i)-pi(2*n-i-1)) * (n-i), i=3..n):
    seq(A279725(n), n=1..100); # Wesley Ivan Hurt, Dec 17 2016
  • Mathematica
    Table[2 Sum[(n - i) Floor[2/PrimeOmega[2 n*i - i^2]], {i, 2, n}], {n, 2, 100}] (* Wesley Ivan Hurt, Dec 20 2013 *)

Formula

a(n) = 2 * Sum_{i=2..n} (n-i) * A064911(2*n*i-i^2). - Wesley Ivan Hurt, Dec 20 2013
a(n) = 2 * Sum_{i=3..n} c(i) * c(2*n-i) * (n-i), where c = A010051. - Wesley Ivan Hurt, Dec 17 2016

Extensions

More descriptive name by Wesley Ivan Hurt, Dec 20 2013

A343770 Numbers k such that 2*k+(A187129(k) mod A185297(k)) is prime.

Original entry on oeis.org

11, 20, 22, 31, 32, 49, 64, 103, 110, 173, 293, 454, 496, 505, 589, 673, 701, 772, 784, 821, 884, 979, 1039, 1292, 1711, 1988, 2236, 2266, 2662, 2701, 4804, 6772, 8641, 8948, 13504, 23867, 40241
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Apr 28 2021

Keywords

Examples

			a(5) = 32 is a term because A187129(32) = 261,
A185297(32) = 59, and 2*32+(261 mod 59) = 89 is prime.
		

Crossrefs

Programs

  • Maple
    g:= proc(n) local i,L,x,y;
      L:= select(t -> isprime(t) and isprime(2*n-t), [2,seq(i,i=3..n,2)]);
      x:= convert(L,`+`);
      y:= nops(L)*2*n - x;
      y mod x
    end proc:
    select(n -> isprime(2*n+g(n)), [$2..10000]); # Robert Israel, Apr 29 2021
  • PARI
    apq(n) = my(s=0, t=0); forprime(p=1, n, if (isprime(2*n-p), s += p; t+= 2*n-p)); t % s;
    isok(k) = isprime(2*k + apq(k)); \\ Michel Marcus, Apr 29 2021

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

A185297 Consider all pairs of primes (p,q) with p+q = 2n, p <= q; a(n) is the sum of all the p's.

Original entry on oeis.org

2, 3, 3, 8, 5, 10, 8, 12, 10, 19, 23, 23, 16, 31, 16, 36, 42, 26, 31, 48, 23, 48, 59, 42, 39, 71, 35, 62, 108, 53, 59, 96, 38, 83, 108, 91, 77, 127, 76, 107, 178, 85, 92, 217, 66, 127, 169, 87, 148, 204, 121, 148, 196, 134, 165, 268, 122, 168, 358, 136, 145, 340, 111, 219, 323, 206, 157, 282, 255, 272, 373, 246, 175, 486, 132, 260, 419
Offset: 2

Views

Author

N. J. A. Sloane, Mar 11 2011

Keywords

Examples

			2*5 = 10 can be expressed as the sum of two primes in two ways, 3+7 and 5+5, so a(5) = 3+5 = 8.
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    a:=n-> sum( (i)*( ((pi(i) - pi(i-1)) * (pi(2*n-i) - pi(2*n-i-1))) ), i = 1..n ); seq(a(k),k=1..100); # Wesley Ivan Hurt, Jan 20 2013
  • PARI
    a(n) = my(s=0); forprime(p=1, n, if (isprime(2*n-p), s += p)); s; \\ Michel Marcus, Apr 29 2021

Formula

a(n) = Sum_{i=1..n} i * c(i) * c(2*n-i), where c = A010051. - Wesley Ivan Hurt, Apr 29 2021
a(n) = sopf(A362641(n)), n>=2. - Wesley Ivan Hurt, Apr 28 2023

A226237 Sum of the parts in the Goldbach partitions of 2n.

Original entry on oeis.org

0, 4, 6, 8, 20, 12, 28, 32, 36, 40, 66, 72, 78, 56, 90, 64, 136, 144, 76, 120, 168, 132, 184, 240, 200, 156, 270, 168, 232, 360, 186, 320, 396, 136, 350, 432, 370, 380, 546, 320, 410, 672, 430, 352, 810, 368, 470, 672, 294, 600, 816, 520, 636, 864, 660, 784
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 25 2013

Keywords

Comments

Goldbach's Conjecture states that every positive even integer > 4 is expressible as the sum of two odd primes in at least one way. This is logically equivalent to the statement that a(n) > 0 for n > 2.
The sum of the parts in the partitions of 2n into exactly two prime parts.

Examples

			a(13) = 78.  Since 2*13 = 26 has exactly 3 Goldbach partitions: (23,3),(19,7), and (13,13).  The sum of the parts gives: 23+19+13+13+7+3 = 78.
		

Crossrefs

Cf. A045917, A185297, A187129, A187619 (Sum of differences).

Programs

  • Maple
    with(numtheory); A226237:=n->2*n*sum( (pi(i)-pi(i-1)) * (pi(2*n-i)-pi(2*n-i-1)), i=1..n); seq(A226237(n), n=1..100);
  • Mathematica
    Table[ 2 n*Sum[ Floor[2/PrimeOmega[2 n*i - i^2]], {i, 2, n}], {n,
      100}]

Formula

a(n) = 2n * A045917(n). a(n) = A185297(n) + A187129(n), n>1.

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

A280251 Sum of the larger parts of the partitions of 2n into two squarefree parts.

Original entry on oeis.org

1, 5, 8, 18, 12, 34, 31, 63, 56, 88, 83, 129, 91, 138, 103, 195, 173, 303, 199, 345, 256, 442, 274, 482, 294, 525, 410, 539, 487, 668, 517, 714, 539, 913, 675, 1150, 776, 1131, 755, 1223, 783, 1406, 898, 1551, 1163, 1605, 1191, 1774, 1271, 1875, 1378, 2031, 1521, 2547
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 29 2016

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): A280251:=n->sum((2*n-i)*mobius(i)^2*mobius(2*n-i)^2, i=1..n): seq(A280251(n), n=1..100);
  • Mathematica
    Table[Total[Select[IntegerPartitions[2 n,{2}],AllTrue[#,SquareFreeQ]&][[;;,1]]],{n,60}] (* Harvey P. Dale, Apr 22 2023 *)

Formula

a(n) = Sum_{i=1..n} (2*n-i) * mu(i)^2 * mu(2*n-i)^2, where mu is the Möbius function (A008683).
a(n) = A280252(n) - A280250(n).

A186201 Consider all ways of writing 2n = p + q where p, q are primes, p <= n and q >= n; let s1(n) = sum of the p's and s2(n) = sum of the q's; the sequence lists the integers 2n for which s1(n) divides s2(n).

Original entry on oeis.org

4, 6, 16, 18, 20, 32, 52, 72, 102, 180, 3212
Offset: 1

Views

Author

J. M. Bergot, Feb 14 2011

Keywords

Comments

This is a list of values of 2n such that A185297(n) divides A187129(n). - N. J. A. Sloane, Mar 10 2011
I have some fast code for counting Goldbach partitions. I made a slight change so that it sums the partitions instead. Using this new program, I did not find any additional terms < 10^7. - T. D. Noe, Mar 10 2011

Examples

			For 2n=52, the partitions are (5,47), (11,41) and (23,29).  The lesser sum of primes is 5+11+23=39 and the greater sum of primes is 29+41+47=117, with 39|117 for quotient 3.
For the 2n listed, the values of (s1(n), s2(n)/s1(n)) are (2,1), (3,1), (8,3), (12,2), (10,3), (16,3), (39,3), (108,3), (204,3), (630,3), (35332,3).
		

Crossrefs

Programs

  • Mathematica
    okQ[n_] := Module[{p, q}, p = Select[Prime[Range[PrimePi[n]]], PrimeQ[2 n - #] &]; q = 2 n - p; Mod[Plus @@ q, Plus @@ p] == 0]; 2*Select[Range[2, 10000], okQ]
  • PARI
    isok(n) = if (!(n%2), my(s1=0, s2=0); forprime(p=1, n/2, if (isprime(n-p), s1 += p; s2 += n-p)); s1 && !(s2 % s1));
    for (n=1, 10000, if (isok(2*n), print1(2*n, ", "))) \\ Michel Marcus, Mar 13 2023

A357128 a(n) is the least even number k > 2 such that the sum of the lower elements and the sum of the upper elements in the Goldbach partitions of k are both divisible by 2^n, but not both divisible by 2^(n+1).

Original entry on oeis.org

6, 4, 10, 16, 32, 468, 464, 3576, 14954, 96000, 403200
Offset: 0

Views

Author

J. M. Bergot and Robert Israel, Sep 13 2022

Keywords

Comments

a(n) is the least even number k > 2 such that min(A007814(A185297(k/2)), A007814(A187129(k/2))) = n.

Examples

			a(2) = 10 because the Goldbach partitions of 10 are 3+7 and 5+5, and 3+5 = 8 and 7+5 = 12 are both divisible by 2^2, but 12 is not divisible by 2^3; and 10 is the least even number > 2 that works.
		

Crossrefs

Programs

  • Maple
    N:= 10^4: # to use the first N primes
    P:= [seq(ithprime(i),i=2..N)]:
    M:= P[-1]+3:
    L:= Vector(M): H:= Vector(M):
    L[4]:= 2: H[4]:= 2:
    for i from 1 to N-1 do
      for j from i to N-1 do
         t:= P[i]+P[j];
         if t > M then break fi;
         L[t]:= L[t]+P[i];
         H[t]:= H[t]+P[j];
    od od:
    V:= Array(0..9): count:= 0:
    for n from 4 by 2 to M while count < 10 do
      v:= padic:-ordp(igcd(L[n],H[n]),2);
      if V[v]=0 then count:= count+1; V[v]:= n; fi
    od:
    convert(V,list);
Showing 1-9 of 9 results.