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.
%I A325142 #35 Jun 02 2020 01:14:47 %S A325142 -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, %T A325142 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, %U A325142 6,5,0,15,2,3,0,1,0,15,4,3,6,5,0,9,2,15,0 %N A325142 a(n) = k if (n - k, n + k) is the centered Goldbach partition of 2n if it exists and -1 otherwise. %C A325142 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. %C A325142 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 %H A325142 Peter Luschny, <a href="/A325142/b325142.txt">Table of n, a(n) for n = 0..10000</a> %F A325142 a(n) = n - A112823(n) = A234345(n) - n (= n - A002374(n) for n > 2). - _M. F. Hasler_, May 02 2019 %F A325142 a(n) = A047160(n) = A066285(n)/2 for n >= 2. - _Alois P. Heinz_, Jun 01 2020 %e A325142 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. %p A325142 a := proc(n) local k; for k from 0 to n do %p A325142 if isprime(n + k) and isprime(n - k) then return k fi od: -1 end: %p A325142 seq(a(n), n=0..83); %t A325142 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 *) %o A325142 (PARI) a(n) = for(k=0, n, if(ispseudoprime(n+k) && ispseudoprime(n-k), return(k))); -1 \\ _Felix Fröhlich_, May 02 2019 %o A325142 (PARI) apply( A325142(n)=-!forprime(p=n,2*n, isprime(n*2-p)&&return(p-n)), [0..99]) \\ _M. F. Hasler_, May 02 2019 %Y A325142 Cf. A045917, A047160, A066285. %Y A325142 Cf. A002374, A112823, A002374, A234345, A020482. %K A325142 sign %O A325142 0,9 %A A325142 _Peter Luschny_, May 02 2019