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.

A356478 a(n) is the least k such that there are exactly n primes p <= k such that 2*k-p and p*(2*k-p)+2*k are also prime.

Original entry on oeis.org

2, 4, 11, 15, 21, 35, 42, 111, 81, 117, 126, 60, 291, 147, 225, 417, 210, 330, 357, 555, 561, 375, 315, 477, 735, 552, 420, 975, 630, 585, 816, 840, 930, 1925, 1302, 1170, 1140, 2202, 1215, 1155, 1911, 1551, 2031, 1590, 1365, 2136, 1425, 2562, 1740, 1485, 2331, 2790, 2160, 2100, 2640, 2010, 3681, 2400, 1785, 2262, 3252, 2622, 2940, 1575, 2310, 2541, 3987, 2772
Offset: 0

Views

Author

J. M. Bergot and Robert Israel, Sep 01 2022

Keywords

Comments

a(n) is the least k such that A356864(k) = n.

Examples

			a(3) = 15 because there are exactly 3 primes p <= 15 with 30-p and p*(30-p)+30 prime, namely 7, 11 and 13, and no smaller number works.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,q,t;
      p:= 1: t:= 0:
      do
        p:= nextprime(p);
        q:= n-p;
        if q <= p then return t fi;
        if isprime(q) and isprime(p*q+n) then t:= t+1 fi;
      od
    end proc:
    V:= Array(0..100): V[0]:= 2: count:= 1:
    for nn from 2 while count < 101 do
      v:= f(2*nn);
      if v > 100 then next fi;
      if V[v] = 0 then count:= count+1; V[v]:= nn; fi;
    od:
    convert(V,list);