OFFSET
1,1
COMMENTS
Are all terms distinct? Is a(1)=a(3)=10 the only case of equality?
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Zak Seidov, Graph of first 50 terms.
MATHEMATICA
Table[Function[p, k = 1; While[! Divisible[Set[s, Total@ Prime@ Range[k, k + 2]], p], k++]; s]@ Prime@ n, {n, 53}] (* or *)
s = Total /@ Partition[Prime@ Range[10^4], 3, 1]; Table[SelectFirst[s, Divisible[#, Prime@ n] &], {n, 53}] (* Michael De Vlieger, Jul 04 2017 *)
PROG
(PARI) a(n)=p = 2; q = 3; pn = prime(n); forprime(r=5, , if (((s=p+q+r) % pn) == 0, return (s)); p = q; q = r; ); \\ Michel Marcus, Jul 04 2017
(PARI) isA034961(n)=my(p=precprime(n\3), q=nextprime(n\3+1), r=n-p-q); if(r>q, r==nextprime(q+2), r==precprime(p-1) && r)
a(n, p=prime(n))=if(p==5, return(10)); my(k=1); while(!isA034961(p*k), k+=2); p*k \\ Charles R Greathouse IV, Jul 05 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jul 04 2017
STATUS
approved