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.

Previous Showing 41-50 of 109 results. Next

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

A238134 Number of primes p < n with q = floor((n-p)/4) and prime(q) - q + 1 both prime.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 6, 5, 5, 5, 3, 4, 6, 6, 7, 6, 4, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 4, 4, 6, 6, 4, 5, 5, 5, 7, 6, 6, 6, 5, 5, 4, 4, 5, 5, 5, 5, 5, 6, 8, 8, 8, 7, 7, 7, 4, 4, 4, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 03 2014

Keywords

Comments

Conjecture: Let m > 0 and n > 2*m + 1 be integers. If m = 1 and 2 | n, or m = 3 and n is not congruent to 1 modulo 6, or m = 2, 4, 5, ..., then there is a prime p < n such that q = floor((n-p)/m) and prime(q) - q + 1 are both prime.
In the cases m = 1, 2, this gives refinements of Goldbach's conjecture and Lemoine's conjecture (see also A235189). For m > 2, the conjecture is completely new.
See also A238701 for a similar conjecture involving primes q with q^2 - 2 also prime.

Examples

			 a(29) = 3 since 7, floor((29-7)/4) = 5 and prime(5) - 5 + 1 = 11 - 4 = 7 are all prime; 17, floor((29-17)/4) = 3 and prime(3) - 3 + 1 = 5 - 2 = 3 are all prime; 19, floor((29-19)/4) = 2 and prime(2) - 2 + 1 = 3 - 1 = 2 are all prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[n]&&PrimeQ[Prime[n]-n+1]
    a[n_]:=Sum[If[PQ[Floor[(n-Prime[k])/4]],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]

A238701 Number of primes p < n with q = floor((n-p)/4) and q^2 - 2 both prime.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 6, 5, 5, 5, 3, 4, 6, 6, 7, 6, 4, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 4, 4, 6, 6, 4, 5, 5, 5, 7, 6, 6, 6, 5, 5, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 5, 5, 5, 5, 3, 4, 5, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 03 2014

Keywords

Comments

Conjecture: Let m > 0 and n > 2*m + 1 be integers. If m = 1 and 2 | n, or m = 3 and n is not congruent to 1 modulo 6, or m = 2, 4, 5, ..., then there is a prime p < n with q = floor((n-p)/m) and q^2 - 2 both prime.
In the case m = 1, this is a refinement of Goldbach's conjecture. In the case m = 2, this is stronger than Lemoine's conjecture (cf. A046927). The conjecture for m > 2 seems completely new. We view the conjecture as a natural extension of Goldbach's conjecture.

Examples

			a(11) = 2 since 2, floor((11-2)/4)= 2 and 2^2 - 2 are all prime, and 3, floor((11-3)/4) = 2 and 2^2 - 2 are all prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[n]&&PrimeQ[n^2-2]
    p[n_,k_]:=PQ[Floor[(n-Prime[k])/4]]
    a[n_]:=Sum[If[p[n,k],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]

A258713 A001172(n)/2: Least k such that 2k is a sum of two odd primes in exactly n ways.

Original entry on oeis.org

0, 3, 5, 11, 17, 24, 30, 39, 42, 45, 57, 72, 60, 84, 90, 117, 123, 144, 120, 105, 162, 150, 180, 237, 165, 264, 288, 195, 231, 240, 210, 285, 255, 336, 396, 378, 438, 357, 399, 345, 519, 315, 504, 465, 390, 480, 435, 462, 450, 567, 717, 420, 495, 651
Offset: 0

Views

Author

N. J. A. Sloane, Jun 14 2015

Keywords

Comments

Up to a(14) also indices of records in A002375, number of ways to write 2n as sum of two odd primes. - M. F. Hasler, Aug 21 2017

Crossrefs

Programs

  • Maple
    g:= add(x^ithprime(i),i=2..1000):
    G:= series((g^2+add(x^(2*ithprime(i)),i=2..1000))/2,x,ithprime(1001)+3):
    A[0]:= 0:
    for k from 1 to (ithprime(1001)+1)/2 do
      m:= coeff(G,x,2*k);
      if not assigned(A[m]) then A[m]:= k fi;
    od:
    for m from 1 while assigned(A[m]) do od:
    seq(A[i],i=0..m-1); # Robert Israel, Aug 21 2017
  • Mathematica
    With[{s = Array[Count[Select[IntegerPartitions[2 #, 2], Length@ # == 2 &], p_ /; AllTrue[p, And[PrimeQ@ #, OddQ@ #] &]] &, 10^3]}, Table[FirstPosition[s, n][[1]] /. 1 -> 0, {n, 0, 53}]] (* Michael De Vlieger, Aug 21 2017 *)

Extensions

Edited by M. F. Hasler, Aug 21 2017
Edited by Robert Israel, Aug 21 2017

A279481 Count the primes appearing in each interval [p,q] where (p,q) is a Goldbach partition of 2n, and then add the results.

Original entry on oeis.org

0, 0, 1, 2, 4, 2, 5, 8, 6, 9, 13, 12, 14, 10, 12, 12, 24, 22, 9, 20, 24, 27, 29, 38, 36, 24, 39, 29, 33, 43, 24, 58, 58, 17, 52, 60, 53, 63, 80, 46, 54, 87, 70, 46, 100, 62, 58, 87, 31, 79, 104, 71, 87, 119, 99, 116, 152, 114, 94, 181, 54, 82, 144, 39, 116, 133
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 12 2016

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): A279481:=n->add( (pi(i)-pi(i-1)) * (pi(2*n-i)-pi(2*n-i-1)) * (pi(2*n-i)-pi(i-1)), i=2..n): 0,0,seq(A279481(n), n=3..100);
  • Mathematica
    f[n_] := Sum[ Boole[ PrimeQ[ i]] Boole[ PrimeQ[ 2n -i]] (PrimePi[ 2n -i] - PrimePi[i -1]), {i, 2, n}]; f[2] = 0; Array[ f, 80] (* Robert G. Wilson v, Dec 15 2016 *)

Formula

a(n) = Sum_{i=2..n} A010051(i)*A010051(2*n-i)*(pi(2*n-i)-pi(i-1)) for n > 2.

A281687 Number of partitions of 2*n into the sum of two totient numbers (A002202).

Original entry on oeis.org

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

Views

Author

Altug Alkan, Jan 27 2017

Keywords

Comments

See also graph of A045917 ("Goldbach's comet"). - Altug Alkan, Jan 30 2017

Examples

			a(6) = 3 because 2 * 6 = 12 = 2 + 10 = 4 + 8 = 6 + 6 and 2, 4, 6, 8, 10 are in A002202.
		

Crossrefs

Programs

  • Maple
    N:= 1000: V:= Vector(2*N):
    V[1]:= 1:
    for n from 2 to 2*N by 2 do
      if nops(numtheory:-invphi(n))>1 then V[n]:= 1 fi
    od:
    C:= map(round,SignalProcessing:-Convolution(V,V)):
    seq((C[2*i-1]+V[i])/2,i=1..N); # Robert Israel, Jan 27 2017
  • PARI
    a(n) = sum(k=1, n, istotient(k) && istotient(2*n-k));

A325142 a(n) = k if (n - k, n + k) is the centered Goldbach partition of 2n if it exists and -1 otherwise.

Original entry on oeis.org

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

Views

Author

Peter Luschny, May 02 2019

Keywords

Comments

Let N = 2*n = p + q where p and q are primes. We call such a pair (p, q) a Goldbach partition of N. A centered Goldbach partition is the Goldbach partition of the form (n - k, n + k) where k >= 0 is minimal. If N has a centered Goldbach partition then a(n) is this k and otherwise -1.
According to Goldbach's conjecture, any even N = 2n > 2 has a Goldbach partition, which is necessarily of the form p = n - k, q = n + k: namely, with n = (p+q)/2 and k = (q-p)/2. - M. F. Hasler, May 02 2019

Examples

			a(162571) = 78 because 325142 = 162493 + 162649 and there is no k, 0 <= k < 78, such that (162571 - k, 162571 + k) is a Goldbach partition of 325142.
		

Crossrefs

Programs

  • Maple
    a := proc(n) local k; for k from 0 to n do
    if isprime(n + k) and isprime(n - k) then return k fi od: -1 end:
    seq(a(n), n=0..83);
  • Mathematica
    a[n_] := Module[{k}, For[k = 0, k <= n, k++, If[PrimeQ[n+k] && PrimeQ[n-k], Return[k]]]; -1]; Table[a[n], {n, 0, 83}] (* Jean-François Alcover, Jul 06 2019, from Maple *)
  • PARI
    a(n) = for(k=0, n, if(ispseudoprime(n+k) && ispseudoprime(n-k), return(k))); -1 \\ Felix Fröhlich, May 02 2019
    
  • PARI
    apply( A325142(n)=-!forprime(p=n,2*n, isprime(n*2-p)&&return(p-n)), [0..99]) \\ M. F. Hasler, May 02 2019

Formula

a(n) = n - A112823(n) = A234345(n) - n (= n - A002374(n) for n > 2). - M. F. Hasler, May 02 2019
a(n) = A047160(n) = A066285(n)/2 for n >= 2. - Alois P. Heinz, Jun 01 2020

A362640 Product of the larger primes, q, in the Goldbach partitions of 2n such that p + q = 2n, p <= q, and p,q prime (or 1 if no Goldbach partition of 2n exists).

Original entry on oeis.org

1, 2, 3, 5, 35, 7, 77, 143, 143, 221, 3553, 4199, 5681, 391, 7429, 551, 351509, 392863, 589, 24679, 765049, 47027, 1175921, 58642669, 2318087, 55883, 95041567, 84323, 2961799, 5037203051, 78647, 367569469, 14263488419, 2257, 403723843, 22531226387, 461671607, 761740327
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 28 2023

Keywords

Examples

			a(10) = 221; 2*10 = 20 has two Goldbach partitions, namely 17+3 and 13+7. The product of the larger parts of these partitions, is 17*13 = 221.
		

Crossrefs

Cf. A010051, A045917, A337568 (product of all prime parts), A362641 (product of smaller primes p).

Programs

  • Mathematica
    Table[Product[(2 n - k)^((PrimePi[k] - PrimePi[k - 1]) (PrimePi[2 n - k] - PrimePi[2 n - k - 1])), {k, n}], {n, 40}]

Formula

a(n) = Product_{k=1..n} (2n - k)^(c(k)*c(2n - k)), where c is the prime characteristic (A010051).
a(n) = Product_{p+q = 2n, p<=q, and p,q prime} q.
a(n) = A337568(n) / A362641(n).

A362641 Product of the smaller primes, p, in the Goldbach partitions of 2n such that p + q = 2n, p <= q, and p,q prime (or 1 if no Goldbach partition of 2n exists).

Original entry on oeis.org

1, 2, 3, 3, 15, 5, 21, 15, 35, 21, 165, 385, 273, 55, 1001, 39, 2805, 7735, 133, 561, 13585, 273, 5865, 124355, 5187, 1265, 391391, 741, 27115, 19605131, 1767, 64515, 5766215, 217, 374187, 12212915, 313131, 170085, 142635185, 63973, 902451, 13147103255, 223041, 101065, 818183948197
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 28 2023

Keywords

Examples

			a(10) = 21; 2*10 = 20 has two Goldbach partitions, namely 17+3 and 13+7. The product of the smaller parts of these partitions, is 3*7 = 21.
		

Crossrefs

Cf. A010051, A045917, A337568 (product of all prime parts), A362640 (product of the larger primes q).

Programs

  • Mathematica
    Table[Product[k^((PrimePi[k] - PrimePi[k - 1]) (PrimePi[2 n - k] - PrimePi[2 n - k - 1])), {k, n}], {n, 40}]

Formula

a(n) = Product_{k=1..n} k^(c(k)*c(2n - k)), where c is the prime characteristic (A010051).
a(n) = Product_{p+q = 2n, p<=q, and p,q prime} p.
a(n) = A337568(n) / A362640(n).
Previous Showing 41-50 of 109 results. Next