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.

A356190 a(n) is the least prime p such that there are exactly n primes strictly between p and 2*p, or -1 if there is no such p.

This page as a plain text file.
%I A356190 #9 Aug 18 2022 11:44:32
%S A356190 2,7,11,17,23,29,31,-1,37,-1,53,61,59,71,79,89,-1,109,97,101,-1,-1,
%T A356190 127,-1,137,151,149,157,-1,179,-1,191,-1,-1,211,-1,-1,223,233,-1,251,
%U A356190 257,263,293,-1,-1,-1,-1,307,311,-1,-1,-1,331,349,347,367,373,379,389,409,-1,-1,419,-1,431,443
%N A356190 a(n) is the least prime p such that there are exactly n primes strictly between p and 2*p, or -1 if there is no such p.
%H A356190 Robert Israel, <a href="/A356190/b356190.txt">Table of n, a(n) for n = 1..9999</a>
%F A356190 a(n) <= A168421(n+1) - 2, with equality for n = 6, 263, 3061, 4750, 4893, 5029, 5555, 6101, ....
%e A356190 a(3) = 11 because there are exactly 3 primes between 11 and 22, namely 13, 17 and 19, and 11 is the least prime that works.
%p A356190 V:= Vector(100,-1): p:= 1:
%p A356190 for n from 1 while p < 727 do # note that A168421(101) = 727
%p A356190   p:= nextprime(p);
%p A356190   v:= numtheory:-pi(2*p)-n;
%p A356190   if v <= 100 and V[v] = -1 then
%p A356190     V[v]:= p;
%p A356190   fi
%p A356190 od:
%p A356190 convert(V,list);
%Y A356190 Cf. A168421.
%K A356190 sign
%O A356190 1,1
%A A356190 _J. M. Bergot_ and _Robert Israel_, Jul 29 2022