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

A065978 For even k >= 4, let f(k) = A066285(k/2) be the minimal difference between primes p and q whose sum is k. Such a k is in the sequence if f(k) > f(m) for all even m with 4 <= m < k.

Original entry on oeis.org

4, 8, 16, 44, 92, 242, 256, 272, 292, 476, 530, 572, 682, 688, 1052, 1808, 2228, 3382, 3472, 3502, 3562, 4952, 6194, 7102, 10262, 17008, 20684, 37052, 45128, 49552, 80144, 137414, 251806, 349826, 362534, 742856, 1655152, 1872236, 2108282, 2319728, 2707118
Offset: 1

Views

Author

Jon Perry, Dec 09 2001

Keywords

Comments

The values of f(a(n)) (given in A066286) appear to be divisible by 6, except the first two.

Examples

			4 = 2+2; the gap is 0. 6=3+3 (0). 8=3+5; the gap is 2, and this is the largest gap to date, so 8 is in the sequence.
10=5+5 (0), 12=5+7 (2), 14=7+7 (0), 16=5+11 (6), so 16 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := For[p=n/2, True, p--, If[PrimeQ[p]&&PrimeQ[n-p], Return[n-2p]]]; For[n=4; max=-1, True, n+=2, If[f[n]>max, Print[n]; max=f[n]]]

Extensions

More terms from Robert G. Wilson v and Dean Hickerson, Dec 10 2001
Changed offset to 1 (this is a list). - N. J. A. Sloane, Sep 07 2013

A066285 a(n) is the minimal difference between primes p and q whose sum is 2n.

Original entry on oeis.org

0, 0, 2, 0, 2, 0, 6, 4, 6, 0, 2, 0, 6, 4, 6, 0, 2, 0, 6, 4, 18, 0, 10, 12, 6, 8, 18, 0, 2, 0, 18, 8, 6, 12, 10, 0, 18, 4, 6, 0, 2, 0, 6, 4, 30, 0, 10, 24, 6, 16, 18, 0, 14, 24, 6, 8, 30, 0, 2, 0, 18, 8, 6, 12, 10, 0, 30, 4, 6, 0, 2, 0, 30, 8, 6, 12, 10, 0, 18, 4, 30, 0, 10, 24, 6, 28, 18, 0
Offset: 2

Views

Author

Dean Hickerson, Dec 12 2001

Keywords

Comments

Terms are always even numbers because primes present in Goldbach partitions of n > 4 are odd and n = 4 has just one partition (2+2) where the difference is 0. a(n) = 0 iff n is prime. - Marcin Barylski, Apr 28 2018

Crossrefs

Programs

  • Mathematica
    a[n_] := For[p=n, True, p--, If[PrimeQ[p]&&PrimeQ[2n-p], Return[2n-2p]]]
  • PARI
    a(n) = {forstep(k=n, 1, -1, if (isprime(k) && isprime(2*n-k), return(2*n-2*k)););} \\ Michel Marcus, Jun 01 2020

Formula

a(n) = 2 * A047160(n). - Alois P. Heinz, Jun 01 2020

A107926 The least number k such that there are primes p and q with p - q = 2*n, p + q = k, and p the least such prime >= k/2.

Original entry on oeis.org

4, 8, 18, 16, 54, 48, 50, 108, 102, 44, 234, 444, 98, 228, 174, 92, 414, 432, 242, 516, 582, 256, 1182, 672, 406, 612, 846, 272, 1038, 984, 442, 1776, 1902, 292, 1074, 636, 1054, 3312, 1122, 476, 1398, 1464, 530, 1728, 2730, 572, 2706, 3348, 682, 2844, 3342
Offset: 0

Views

Author

Gilmar J. Rodriguez (Gilmar.Rodriguez(AT)nwfwmd.state.fl.us) and Robert G. Wilson v, Jun 16 2005

Keywords

Comments

From the Goldbach conjecture.
A107926 = 2*A103147 by definition.
a(3n)> a(3n-2), a(3n-1), a(3n+1) & a(3n+2) for all n > 0 except for n = 1, 2, 12, 19, 20 or 41.
Of those values found so far a(3n+2) > a(3n+1) by ~8%. - Robert G. Wilson v, Nov 03 2013
Except for 1, all indices, i, not congruent to 0 (mod 3), a(i) is congruent to 0 (mod 6) and for all indices, i, congruent to 0 (mod 3), a(i) is not congruent to 0 (mod 6). Of those not congruent to 0 (mod 6), those congruent to 2 outnumber those congruent to 4, about 8 to 7. Robert G. Wilson v, Nov 03 2013

Examples

			a(0) = 4 because 4=2+2 and 2-2=0.
a(1) = 8 because 8 is the least number with 8=p+q and p-q=2 for primes p and q.
a(2) = 18 because 18=7+11 and the primes 7 and 11 have difference 4.
		

Crossrefs

Cf. A066285, A103147, records in A065978 and A066286.

Programs

  • Mathematica
    f[n_] := For[p = n/2, True, p--, If[PrimeQ[p] && PrimeQ[n - p], Return[n/2 - p]]]; nn=101; t=Table[0,{nn}]; cnt=0; n=1; While[cnt
    				
Showing 1-3 of 3 results.