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.

A342027 a(n) is the least m such that A341284(m) = 2*n*prime(m+1) - prime(m).

This page as a plain text file.
%I A342027 #10 Feb 26 2021 11:15:10
%S A342027 2,3,6,16,24,42,23,50,47,133,138,67,161,106,30,675,455,338,697,137,
%T A342027 488,692,189,934,1863,1552,518,450,2036,1815,2856,3635,6784,8781,2787,
%U A342027 2790,99,11396,3903,2539,9722,1851,6399,7388,6592,24371,12408,14059,32846,21934,13490,72170,42106,15469,45948
%N A342027 a(n) is the least m such that A341284(m) = 2*n*prime(m+1) - prime(m).
%C A342027 a(n) is the least m such that 2*n*prime(m+1)-prime(m) is prime while for all j < n, 2*j*prime(m+1)-prime(m) is not prime.
%H A342027 Robert Israel, <a href="/A342027/b342027.txt">Table of n, a(n) for n = 1..175</a>
%F A342027 A341284(a(n)) = 2*n*prime(a(n)+1)-prime(a(n)).
%e A342027 For k=4, A341284(16) = 419 = 2*4*prime(17)-prime(16) and a(4) = 16.
%p A342027 N:= 60: # for a(1) to a(N)
%p A342027 V:= Vector(N): count:= 0:
%p A342027 g:= proc(n) local k, pn, p1;
%p A342027   pn:= ithprime(n); p1:= ithprime(n+1);
%p A342027   for k from 2*p1-pn by 2*p1 to 2*N*p1-pn do
%p A342027     if isprime(k) then return (k+pn)/(2*p1) fi
%p A342027 od;
%p A342027 N+1
%p A342027 end proc:
%p A342027 for n from 2 while count < N do
%p A342027   v:= g(n);
%p A342027     if v <= N and V[v] = 0 then V[v]:= n; count:= count+1 fi
%p A342027 od:
%p A342027 convert(V,list);
%Y A342027 Cf. A341284.
%K A342027 nonn
%O A342027 1,1
%A A342027 _J. M. Bergot_ and _Robert Israel_, Feb 25 2021