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-10 of 172 results. Next

A082918 Record-setting entries in A002375 (number of decompositions into two odd primes).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 19, 21, 24, 27, 30, 32, 41, 44, 51, 52, 57, 58, 68, 73, 76, 83, 91, 97, 114, 128, 138, 154, 163, 165, 171, 190, 198, 218, 222, 241, 268, 274, 292, 303, 329, 330, 340, 362, 393, 394, 433, 446, 447, 466, 477, 517, 530, 571, 615
Offset: 1

Views

Author

Hugo Pfoertner, Apr 15 2003

Keywords

Examples

			11 is not in the sequence because the first number that can be decomposed into a sum of two odd primes in 12 different ways is 120, whereas the first number with 11 decompositions is 144.
		

Crossrefs

Cf. A002375, A082917 (numbers for which a new record is achieved).

Programs

  • Julia
    # See links.

A137820 Record indices of the ratio A002375(n) / n (Goldbach conjecture related).

Original entry on oeis.org

3, 4, 6, 14, 16, 19, 31, 34, 64, 163, 166, 199, 316, 496, 706, 859, 1024, 1126, 1321, 1336, 2206, 2539, 2644, 2719, 2734, 2974, 3646, 3754, 3931, 4021, 4801, 6826, 7894, 8431, 8506, 9109, 9623, 9904, 10084, 10174, 10321, 10639, 11749, 11839, 13894, 13954, 16174
Offset: 1

Views

Author

M. F. Hasler, Feb 23 2008

Keywords

Comments

The sequence lists indices n for which A002375(n)/n is less than for all previous indices n > 2, or equivalently, assuming that A002375(n) > 0 for all n > 2 (Goldbach conjecture), values for which n/A002375(n) is greater than for all previous indices n > 2.
We do not consider indices n = 1 and n = 2, for which the sequence A002375(n) (= number of prime {p,q} such that 2n = p+q) is zero.
Note also that A045917 = A002375 except for n = 2; since we exclude n < 3, one can equivalently replace one of these two with the other in the definition.
In A002375, an upper bound for A002375(n) is given; however, the Goldbach conjecture is A002375(n) > 0 for all n > 2, thus rather connected to the question of a lower bound. This sequence lists values of n for which A002375(n) is particularly low.
If the conjecture is wrong, then this sequence A137820 is finite: It will end with the counterexample n such that A002375(n) = 0, i.e., 2n cannot be written as the sum of 2 primes.
Conjecture: All terms of this sequence are of the form 2^i, 2^i*p, or 2^i*p*q where i >= 0 and p and q not necessarily distinct odd primes. - Craig J. Beisel, Jun 15 2020

Crossrefs

Cf. A002375 (number of ways to write 2n as sum of two primes).

Programs

  • PARI
    m=1;for(n=3,10^4,n*m<=A002375(n)&&next;m=A002375(n)/n;print1(n", "))

Formula

A137820(k+1) = min { n>2 | A002375(n)/n < A002375(A137820(k))/A137820(k) }.

A280008 First differences of A002375.

Original entry on oeis.org

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

Views

Author

Altug Alkan, Feb 21 2017

Keywords

Comments

See the perception of symmetry on scatterplot of this sequence that is also in Links section.
Are there infinitely many 0's in this sequence?

Crossrefs

Programs

  • PARI
    a002375(n) = sum(i=2, primepi(n), isprime(2*n - prime(i)));
    a(n) = a002375(n+1) - a002375(n);

Formula

a(n) = A002375(n+1) - A002375(n).

A045922 Partial sums of Goldbach numbers A002375.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 7, 9, 11, 13, 16, 19, 22, 24, 27, 29, 33, 37, 39, 42, 46, 49, 53, 58, 62, 65, 70, 73, 77, 83, 86, 91, 97, 99, 104, 110, 115, 120, 127, 131, 136, 144, 149, 153, 162, 166, 171, 178, 181, 187, 195, 200, 206, 214, 220, 227, 237, 243
Offset: 1

Views

Author

Keywords

Crossrefs

A280023 Least k such that A002375(k) = A002375(k+n), or 0 if no such k exists.

Original entry on oeis.org

1, 4, 3, 5, 5, 8, 7, 8, 5, 9, 5, 7, 13, 5, 11, 12, 11, 13, 12, 11, 23, 18, 17, 10, 9, 8, 7, 18, 5, 32, 36, 29, 31, 15, 27, 13, 12, 11, 35, 21, 27, 22, 18, 17, 37, 54, 27, 56, 15, 24, 13, 12, 11, 60, 21, 30, 37, 18, 17, 56, 30, 32, 105, 39, 39, 58, 27, 48, 55, 24, 53, 85, 33, 39, 71, 30, 39, 130, 42, 45, 100, 45, 56, 85, 66, 42, 105, 36, 45, 109, 33, 54, 70, 30, 51, 98, 39, 65, 67, 39, 57, 97, 51
Offset: 1

Views

Author

Altug Alkan, Feb 22 2017

Keywords

Examples

			a(2) = 4 because smallest k such that A002375(k) = A002375(k+2) is 4; A002375(4) = A002375(6) = 1.
		

Crossrefs

Cf. A002375.

Programs

  • PARI
    a002375(n) = sum(i=2, primepi(n), isprime(2*n - prime(i)));
    a(n) = my(k=1); while (a002375(n+k) != a002375(k), k++); k;

A332704 Record indices of the ratio A280008(n) / A002375(n) (Goldbach conjecture related).

Original entry on oeis.org

3, 5, 33, 63, 165, 315, 255255
Offset: 1

Views

Author

Craig J. Beisel, Jun 08 2020

Keywords

Comments

The sequence lists indices n for which A280008(n) / A002375(n) is less than all previous indices n > 2.
We do not consider indices n=1 and n=2, for which the sequence A002375(n) (= number of odd primes {p,q} such that 2n=p+q) is zero.
If the Goldbach conjecture is false, then this sequence is finite. It will end with n such that A280008(n) / A002375(n) = -1 since no further terms could achieve less than this value.
If the Goldbach conjecture is true, then this sequence may be finite or infinite. The ratio A280008(n) / A002375(n) has a lower bound greater than -1 and the value of this ratio for record indices approaches the lower bound.
It is known that this sequence has additional terms beyond a(7) = 17#/2 = 255255 = A070826(7) since A280008(255255) / A002375(255255) = -0.76119 and for A070826(10) = 20#/2 = 3234846615 we have A280008(3234846615) / A002375(3234846615) = -0.78989.

Crossrefs

Programs

  • PARI
    lastx=1; record=999; for(n=4, 1000, x=0; forprime(i=3, n, if(isprime(2*n-i), x=x+1; ); ); y=(x-lastx)/lastx; if(y
    				

Formula

A332704(k+1) = min{ n>2 | A280008(n)/A002375(n) < A002375(A332704(k))/A280008(A332704(k)) }.

A364166 Indices k such that A002375(k) = A002375(k+1) = number of decompositions of 2k into a sum of two odd primes.

Original entry on oeis.org

1, 3, 7, 8, 9, 11, 12, 17, 37, 58, 88, 103, 112, 118, 160, 196, 226, 247, 277, 283, 343, 382, 415, 455, 463, 502, 523, 532, 553, 592, 598, 613, 652, 667, 670, 682, 697, 751, 770, 817, 895, 901, 1012, 1018, 1048, 1123, 1153, 1198, 1318, 1393, 1420, 1708, 1831, 1942, 1972
Offset: 1

Views

Author

M. F. Hasler, Jul 12 2023

Keywords

Comments

Related to the Goldbach conjecture and to the open question (as of today) whether there are two consecutive integers > 11 in this sequence.

Crossrefs

Cf. A002375.

Programs

  • PARI
    [i-1|i<-[2..#A=A002375], A[i-1]==A[i]] \\ where the list A002375 must be defined e.g. by reading the b-file for that sequence.

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

A002372 Goldbach conjecture: number of decompositions of 2n into ordered sums of two odd primes.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The weak form of this conjecture was proved by Helfgott (see link below). - T. D. Noe, May 14 2013
Goldbach conjectured in 1742 that for n >= 3, this sequence never vanishes. This is still unproved.
Number of different primes occurring when 2n is expressed as p1+q1 = ... = pk+qk where pk,qk are odd primes with pk <= qk. For example when n=5: 10 = 3+7 = 5+5, we can see 3 different primes so a(5) = 3. - Naohiro Nomoto, Feb 24 2002
Comments from Tomás Oliveira e Silva to Number Theory List, Feb 05 2005: With the help of Siegfied "Zig" Herzog of PSU, I was able to verify the Goldbach conjecture up to 2e17. Let 2n=p+q, with p and q prime be a Goldbach partition of 2n. In a minimal Goldbach partition p is as small as possible. The largest p of a minimal Goldbach partition found was 8443 and is needed for 2n=121005022304007026. Furthermore, the largest prime gap found was 1220-1; it occurs after the prime 80873624627234849.
Comments from Tomás Oliveira e Silva to Number Theory List, Apr 26 2007: With the help of Siegfried "Zig" Herzog, the NCSA and others, I have just finished the verification of the Goldbach conjecture up to 1e18. This took about 320 years of CPU time, including a double-check of the results up to 1e17. As expected, no counterexample to the conjecture was found. As side results, the number of twin primes up to 1e18 was also computed, as was the number of primes in each of the residue classes modulo 120. Also, the number of occurrences of each (observed) prime gap was also recorded.
For n > 2 we have a(n) = 2*A002375(n)-1 if n is prime and a(n) = 2*A002375(n) if n is composite. - Emeric Deutsch, Jul 14 2004
For n > 2, a(n) = 2*A002375(n) - A010051(n). - Jason Kimberley, Aug 31 2011
a(n) = Sum_{p odd prime < 2*n} A010051(2*n - p). - Reinhard Zumkeller, Oct 19 2011
There is an interesting similarity with square numbers: The number of divisors of n is odd iff n is square (A000290). The number of decompositions of 2n into ordered sums of two primes (equaling the number of the unique primes in all such decompositions) is odd iff n is prime. - Ivan N. Ianakiev, Feb 28 2015

Examples

			2 has no such decompositions, so a(1) = 0.
Idem for 4, whence a(2) = 0.
6 = 3+3, so a(3) = 1.
8 = 3+5 = 5+3, so a(4) = 2.
10 = 5+5 = 3+7 = 7+3, so a(5) = 3.
12 = 5+7 = 7+5; so a(6) = 2, etc.
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 9.
  • R. K. Guy, Unsolved problems in number theory, second edition, Springer-Verlag, 1994.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Section 2.8 (for Goldbach conjecture).
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 79, 80.
  • N. Pipping, Neue Tafeln für das Goldbachsche Gesetz nebst Berichtigungen zu den Haussnerschen Tafeln, Finska Vetenskaps-Societeten, Comment. Physico Math. 4 (No. 4, 1927), pp. 1-27.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • M. L. Stein and P. R. Stein, Tables of the Number of Binary Decompositions of All Even Numbers Less Than 200,000 into Prime Numbers and Lucky Numbers. Report LA-3106, Los Alamos Scientific Laboratory of the University of California, Los Alamos, NM, Sep 1964.

Crossrefs

Essentially identical to A035026.

Programs

  • Haskell
    a002372 n = sum $ map (a010051 . (2*n -)) $ takeWhile (< 2*n) a065091_list
    -- Reinhard Zumkeller, Oct 19 2011
    
  • Magma
    A002372 := func; [A002372(n):n in[1..82]]; // Jason Kimberley, Sep 01 2011
    
  • Maple
    a:=proc(n) local c,k; c:=0: for k from 1 to n do if isprime(2*k+1)=true and isprime(2*n-2*k-1)=true then c:=c+1 else c:=c fi od end: seq(a(n),n=1..82); # Emeric Deutsch, Jul 14 2004
  • Mathematica
    For[lst={}; n=1, n<=100, n++, For[cnt=0; i=1, i<=2n-1, i++ If[OddQ[i]&&PrimeQ[i]&&PrimeQ[2n-i], cnt++ ]]; AppendTo[lst, cnt]]; lst
    (* second program: *)
    A002372[n_] := Module[{i = 0}, Do[If[PrimeQ[2 n - Prime@p], i++], {p, 2, PrimePi[2 n - 3]}]; i]; Array[A002372, 82] (* JungHwan Min, Aug 24 2016 *)
    i[n_] := If[PrimeQ[2 n - 1], 2 n - 1, 0]; A085090 = Array[i, 82];
    r[n_] := Table[A085090[[k]] + A085090[[n - k + 1]], {k, 1, n}];
    countzeros[l_List] := Sum[KroneckerDelta[0, k], {k, l}];
    Table[n - 2 countzeros[A085090[[1 ;; n]]] + countzeros[r[n]],
    {n, 1, 82}] (* Fred Daniel Kline, Aug 13 2018 *)
    countPrimes[n_] := Sum[KroneckerDelta[True, PrimeQ[2 m - 1],
    PrimeQ[2 (n - m + 1) - 1]], {m, 1, n}]; Array[countPrimes, 82] (* Fred Daniel Kline, Oct 07 2018 *)
  • PARI
    isop(n) = (n % 2) && isprime(n);
    a(n) = n*=2; sum(i=1, n-1, isop(i)*isop(n-i)); \\ Michel Marcus, Aug 22 2014 and May 28 2020
    
  • Python
    from sympy import isprime, primerange
    def a(n): return sum([1 for p in primerange(3, 2*n-2) if isprime(2*n-p)])
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Apr 23 2017

Formula

a(n) = A010051(n) + 2*A061357(n), n > 2. - R. J. Mathar, Aug 19 2013

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 13 2002
Edited by M. F. Hasler, May 03 2019

A068307 From Goldbach problem: number of decompositions of n into a sum of three primes.

Original entry on oeis.org

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

Views

Author

Naohiro Nomoto, Feb 24 2002

Keywords

Comments

For even n > 2, a(n) = A061358(n-2). - Reinhard Zumkeller, Aug 08 2009
Vinogradov proved that every sufficiently large odd number is the sum of three primes. - T. D. Noe, Mar 27 2013
The two Helfgott papers show that every odd number greater than 5 is the sum of three primes (this is the Odd Goldbach Conjecture). - T. D. Noe, May 14 2013, N. J. A. Sloane, May 18 2013

Examples

			a(6) = 1 because 6 = 2+2+2,
a(9) = 2 because 9 = 2+2+5 = 3+3+3,
a(15) = 3 because 15 = 2+2+11 = 3+5+7 = 5+5+5,
a(17) = 4 because 17 = 2+2+13 = 3+3+11 = 3+7+7 = 5+5+7.
- _Zak Seidov_, Jun 29 2017
		

Crossrefs

First occurrence: A139321. Records: A139322.
Column k=3 of A117278.

Programs

Formula

a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} A010051(i) * A010051(k) * A010051(n-i-k). - Wesley Ivan Hurt, Mar 26 2019
a(n) = [x^n y^3] Product_{k>=1} 1/(1 - y*x^prime(k)). - Ilya Gutkovskiy, Apr 18 2019

Extensions

More terms from Vladeta Jovovic, Mar 10 2002
Showing 1-10 of 172 results. Next