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.

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

This page as a plain text file.
%I A066285 #20 Jun 01 2020 14:10:25
%S A066285 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,
%T A066285 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,
%U A066285 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
%N A066285 a(n) is the minimal difference between primes p and q whose sum is 2n.
%C A066285 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
%F A066285 a(n) = 2 * A047160(n). - _Alois P. Heinz_, Jun 01 2020
%t A066285 a[n_] := For[p=n, True, p--, If[PrimeQ[p]&&PrimeQ[2n-p], Return[2n-2p]]]
%o A066285 (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
%Y A066285 Cf. A002372, A047160, A065978, A066286, A303603.
%K A066285 nonn,easy
%O A066285 2,3
%A A066285 _Dean Hickerson_, Dec 12 2001