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.

A182138 Irregular triangle T, read by rows, in which row n lists the distances between n and the two primes whose sum makes 2n in decreasing order (Goldbach conjecture).

This page as a plain text file.
%I A182138 #60 Jan 09 2025 09:30:43
%S A182138 0,0,1,2,0,1,4,0,5,3,4,2,7,3,8,6,0,7,5,1,10,6,0,9,3,8,4,2,13,3,14,12,
%T A182138 6,0,13,11,5,1,12,0,17,9,3,16,10,8,2,19,15,9,20,18,6,0,19,17,13,7,5,
%U A182138 22,18,12,6,21,15,3,20,16,14,10,4,25,15,9,24,18,12,0,23,17,13,11,7,1
%N A182138 Irregular triangle T, read by rows, in which row n lists the distances between n and the two primes whose sum makes 2n in decreasing order (Goldbach conjecture).
%C A182138 The Goldbach conjecture is that for any even integer 2n>=4, at least one pair of primes p and q exist such that p+q=2n. The present numbers listed here are the distances d between each prime and n, the half of the even integer 2n: d=n-p=q-n with p <= q.
%C A182138 See the link section for plots I added. - _Jason Kimberley_, Oct 04 2012
%C A182138 Each nonzero entry d of row n is coprime to n. For otherwise n+d would be composite. - _Jason Kimberley_, Oct 10 2012
%H A182138 Alois P. Heinz, <a href="/A182138/b182138.txt">Rows n = 2..600, flattened</a>
%H A182138 OEIS (Plot 2), <a href="/plot2a?name1=A198292&amp;name2=A182138&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=0&amp;radiop1=xy&amp;drawpoints=true">Plot of (n, d) </a>
%H A182138 Subplots for fixed p:
%H A182138 OEIS (Plot 2), <a href="/plot2a?name1=A067076&amp;name2=A098090&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=0&amp;radiop1=xy&amp;drawpoints=true">A067076 vs A098090</a> (p=3).
%H A182138 OEIS (Plot 2), <a href="/plot2a?name1=A089038&amp;name2=A089253&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=1&amp;radiop1=xy&amp;drawpoints=true">A089038 vs A089253</a> (p=5).
%H A182138 OEIS (Plot 2), <a href="/plot2a?name1=A105760&amp;name2=A089192&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=2&amp;radiop1=xy&amp;drawpoints=true">A105760 vs A089192</a> (p=7).
%H A182138 ...
%H A182138 OEIS (Plot 2), <a href="/plot2a?name1=A153143&amp;name2=A097932&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=6&amp;radiop1=xy&amp;drawpoints=true">A153143 vs A097932</a> (p=19).
%H A182138 Wikipedia, <a href="http://en.wikipedia.org/wiki/Goldbach%27s_conjecture">Goldbach's conjecture</a>
%F A182138 T(n,i) = n - A184995(n,i). - _Jason Kimberley_, Sep 25 2012
%e A182138 n=2, 2n=4, 4=2+2, p=q=2 -> d=0.
%e A182138 n=18, 2n=36, four prime pairs have a sum of 36: 5+31, 7+29, 13+23, 17+19, with the four distances d being 13=18-5=31-18, 11=18-7=29-18, 5=18-13=23-18, 1=18-17=19-18.
%e A182138 Triangle begins:
%e A182138   0;
%e A182138   0;
%e A182138   1;
%e A182138   2, 0;
%e A182138   1;
%e A182138   4, 0;
%e A182138   5, 3;
%e A182138   4, 2;
%e A182138   7, 3;
%e A182138   8, 6, 0;
%p A182138 T:= n-> seq(`if`(isprime(p) and isprime(2*n-p), n-p, NULL), p=2..n):
%p A182138 seq(T(n), n=2..40); # _Alois P. Heinz_, Apr 16 2012
%t A182138 T[n_] := Table[If[PrimeQ[p] && PrimeQ[2n-p], n-p, Nothing], {p, 2, n}];
%t A182138 Table[T[n], {n, 2, 30}] // Flatten (* _Jean-François Alcover_, Jan 09 2025, after _Alois P. Heinz_ *)
%o A182138 (PARI) for(n=2,18,forprime(p=2,n,if(isprime(2*n-p),print1(n-p", ")))) \\ _Charles R Greathouse IV_, Apr 16 2012
%o A182138 (Magma) A182138:= func<n|[n-p:p in PrimesUpTo(n)|IsPrime(2*n-p)]>;
%o A182138 &cat[A182138(n):n in [2..30]]; // _Jason Kimberley_, Oct 01 2012
%Y A182138 Cf. A045917 (row lengths), A047949 (first column), A047160 (last elements of rows).
%Y A182138 Cf. A184995.
%K A182138 easy,nonn,look,tabf
%O A182138 2,4
%A A182138 _Jean COHEN_, Apr 16 2012