OFFSET
1,2
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..37
MAPLE
S1:= 0: S2:= 0: Recn:= NULL: count:= 0:
maxv:= 0:
for n from 1 to 200000 do
p:= ithprime(n);
S1:= S1 + p;
S2:= S2 + n*p;
v:= igcd(S1, S2);
if v > maxv then
maxv:= v;
count:= count+1;
Recn:= Recn, n;
fi
od:
Recn;
PROG
(PARI) lista(nn) = {my(k=r=s=t=0); forprime(p=2, nn, if(gcd(s+=p, t+=(k++)*p)>r, r=gcd(s, t); print1(k, ", "))); } \\ Jinyuan Wang, Apr 16 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Jul 09 2019
EXTENSIONS
a(16)-a(27) from Rémy Sigrist, Jul 09 2019
a(28) from Jinyuan Wang, Apr 16 2020
Terms a(29) and beyond from Giovanni Resta, Apr 19 2020
STATUS
approved