|
|
A340214
|
|
a(n) is the least m such that A340212(m) = 2*n.
|
|
3
|
|
|
3, 55, 4, 30, 37, 11, 25, 363, 31, 13, 312, 10, 78, 16, 67, 53, 243, 26, 35, 74, 39, 235, 709, 102, 224, 1192, 33, 207, 103, 94, 192, 940, 19, 833, 633, 99, 64, 680, 261, 434, 3994, 105, 743, 988, 68, 367, 168, 440, 177, 1874, 36, 567, 3810, 468, 250, 1006, 52, 226, 1514, 38, 1313, 3277, 160, 737
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
2*n*prime(a(n))+prime(a(n)-1) and 2*n*prime(a(n))+prime(a(n)+1) are prime.
|
|
LINKS
|
|
|
EXAMPLE
|
For n=4, A340212(30)=8 and this is the first appearance of 8 in A340212, so a(4)=30.
|
|
MAPLE
|
V:= Vector(60): count:= 0:
q:= 3: r:= 5:
for i from 3 while count < 60 do
p:= q; q:= r; r:= nextprime(r);
for k from 2 by 2 do
if isprime(k*q+p) and isprime(k*q+r) then break fi;
od;
v:= k/2;
if v <= 60 and V[v] = 0 then count:= count+1; V[v]:= i; fi
od:
|
|
PROG
|
(PARI) f(n) = my(p=prime(n), k=1); while (! (isprime(k*p+precprime(p-1)) && isprime(k*p+nextprime(p+1))), k++); k; \\ A340212
a(n) = my(m=3); while (f(m) != 2*n, m++); m; \\ Michel Marcus, Jan 01 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|