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.

A339096 Record values in A306400.

Original entry on oeis.org

5, 7, 11, 23, 701, 3989, 4397, 5501, 7309, 9281, 10331, 11243, 12907, 16127, 27917, 39901, 43051, 44843, 48397, 66569, 70657
Offset: 1

Views

Author

Robert Israel, Nov 23 2020

Keywords

Examples

			a(3) = 11 is in the sequence because A306400(5) = 11 and A306400(k)<11 for k < 5.
		

Crossrefs

Cf. A306400.

Programs

  • Maple
    g:= proc(p) local q;
      q:= 3:
      do
        q:= nextprime(q);
        if isprime(p+q^2-1) and isprime(p+q^2+1) then return q fi;
      od
    end proc:
    R:= NULL: count:= 0: w:= 0:
    for nn from 5 by 6 while count < 15 do
      if isprime(nn) then
        v:= g(nn);
        if v > w then count:= count+1; R:= R, v; w:= v; fi
        fi
    od:
    R;
  • Mathematica
    g[p_] := Module[{q}, q = 3; While[True, q = NextPrime[q]; If [PrimeQ[p + q^2 - 1] && PrimeQ[p + q^2 + 1], Return@q]]];
    R = {}; count = 0; w = 0;
    For[nn = 5, count < 15, nn = nn + 6, If[PrimeQ[nn], v = g[nn]; If[v > w, count++; Print[count, " ", v]; R = Append[R, v]; w = v]]];
    R (* Jean-François Alcover, Mar 07 2024, after Robert Israel *)

Extensions

a(16)-a(17) from Jinyuan Wang, Dec 04 2020
a(18)-a(21) from Chai Wah Wu, Jan 15 2021
Showing 1-1 of 1 results.