OFFSET
1,1
COMMENTS
The sequence is non-monotone and infinite.
LINKS
Robert Israel, Table of n, a(n) for n = 1..2000
EXAMPLE
7 = 3 + 2*2,
11 = 7 + 2*2 = 5 + 2*3,
23 = 13 + 2*5 = 17 + 2*3 = 19 + 2*2,
17 = 3 + 2*7 = 7 + 2*5 = 11 + 2*3 = 13 + 2*2.
MAPLE
N:= 10000: # for all terms before the first term > N
V:= Vector(N):
Primes:= select(isprime, [2, seq(i, i=3..N, 2)]):
for ip from 1 to nops(Primes) do
p:= Primes[ip];
for iq from 1 do
r:= p+2*Primes[iq];
if r > N then break fi;
V[r]:= V[r]+1;
od od:
Nmax:= max(V):
A:= Vector(Nmax):
for p in Primes do
m:= V[p];
if m > 0 and A[m] = 0 then A[m]:= p fi;
od:
m:= min(select(t -> A[t]=0, [$1..Nmax])):
seq(A[i], i=1..m-1); # Robert Israel, Jun 07 2020
MATHEMATICA
np[n_] := np[n] = Length@ Select[n - 2*Prime@ Range@ PrimePi[n/2], PrimeQ]; a[n_] := Block[{p=2}, While[np[p] != n, p = NextPrime@ p]; p]; Array[a, 100] (* Giovanni Resta, Mar 19 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Mar 19 2017
STATUS
approved