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.

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

Original entry on oeis.org

2, 3, 6, 16, 24, 42, 23, 50, 47, 133, 138, 67, 161, 106, 30, 675, 455, 338, 697, 137, 488, 692, 189, 934, 1863, 1552, 518, 450, 2036, 1815, 2856, 3635, 6784, 8781, 2787, 2790, 99, 11396, 3903, 2539, 9722, 1851, 6399, 7388, 6592, 24371, 12408, 14059, 32846, 21934, 13490, 72170, 42106, 15469, 45948
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Feb 25 2021

Keywords

Comments

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.

Examples

			For k=4, A341284(16) = 419 = 2*4*prime(17)-prime(16) and a(4) = 16.
		

Crossrefs

Cf. A341284.

Programs

  • Maple
    N:= 60: # for a(1) to a(N)
    V:= Vector(N): count:= 0:
    g:= proc(n) local k, pn, p1;
      pn:= ithprime(n); p1:= ithprime(n+1);
      for k from 2*p1-pn by 2*p1 to 2*N*p1-pn do
        if isprime(k) then return (k+pn)/(2*p1) fi
    od;
    N+1
    end proc:
    for n from 2 while count < N do
      v:= g(n);
        if v <= N and V[v] = 0 then V[v]:= n; count:= count+1 fi
    od:
    convert(V,list);

Formula

A341284(a(n)) = 2*n*prime(a(n)+1)-prime(a(n)).
Showing 1-1 of 1 results.