OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(14) = 17 because A050936(14) = 36 is the sum of two or more consecutive primes in two ways, 17 + 19 and 5 + 7 + 11 + 13, and 17 is the greatest starting prime of these.
MAPLE
N:= 1000: # for terms of A050936 up to N
P:= select(isprime, [2, seq(i, i=3..N, 2)]):
SP:= ListTools:-PartialSums([0, op(P)]): nSP:= nops(SP):
S:= {}:
for i from nSP-2 to 1 by -1 do
for j from i+2 to nSP do
s:= SP[j]-SP[i];
if s > N then break fi;
if not member(s, S) then
S:= S union {s};
R[s]:= P[i];
fi
od od:
S:= sort(convert(S, list)):
[seq(R[S[i]], i=1..nops(S))];
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Will Gosnell and Robert Israel, Dec 09 2025
STATUS
approved
