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

A335046 Maximal common prime of two Goldbach partitions of 2n and 2(n+1) or zero (if common prime does not exist).

Original entry on oeis.org

0, 3, 5, 7, 7, 11, 13, 13, 17, 19, 19, 23, 23, 19, 29, 31, 31, 0, 37, 37, 41, 43, 43, 47, 47, 43, 53, 53, 43, 59, 61, 61, 0, 67, 67, 71, 73, 73, 0, 79, 79, 83, 83, 79, 89, 89, 79, 0, 97, 97, 101, 103, 103, 107, 109, 109, 113, 113, 109, 0, 113, 109, 0, 127, 127, 131, 131, 127, 137, 139, 139
Offset: 2

Views

Author

Ivan N. Ianakiev, May 21 2020

Keywords

Examples

			4 = 2+2 and 6 = 3+3. Since those are the only available Goldbach partitions and they have no common prime, a(4/2) = a(2) = 0. 14 = 3+11 and 16 = 5+11, so a(14/2) = a(7) = 11.
		

Crossrefs

Programs

  • Maple
    S:= proc(n) option remember; {seq((h-> `if`(
          andmap(isprime, h), h, [])[])([n+i, n-i]), i=0..n-2)}
        end:
    a:= n-> max(0, (S(n) intersect S(n+1))[]):
    seq(a(n), n=2..80);  # Alois P. Heinz, Jun 20 2020
  • Mathematica
    d[n_]:=Flatten[Cases[FrobeniusSolve[{1,1},2*n],{?PrimeQ}]]
    e[n_]:=Intersection[d[n],d[n+1]]; f[n_]:=If[e[n]=={},0,Max[e[n]]];
    f/@Range[2,100]
Showing 1-1 of 1 results.