OFFSET
1,1
LINKS
C. Rivera (Ed.), Puzzle 415. Sets of consecutive primes such that... on primepuzzles.net.
EXAMPLE
{47, 53, 59, 61} are 4 consecutive primes, 47+53 is a multiple of 2, 47+53+59 is a multiple of 3 and 47+53+59+61 is a multiple of 4. Since this is the least such set, a(4)=47.
PROG
(PARI) A214219(n)={ n<2 & return(2); my(p=vector(n, k, prime(k)), s=sum(k=1, n, p[k]), t);
for(i=0, 9e9, (s += -p[i%n+1] + p[i%n+1]=nextprime(p[(i-1)%n+1]+1))%n & next; (t=s-p[i%n+1])%(n-1) & next; for(j=2, n-2, (t -= p[(i-j+1)%n+1])%(n-j) & next(2)); return(p[(i+1)%n+1]))}
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jul 22 2012
EXTENSIONS
a(13)-a(14) from Jens Kruse Andersen, Jul 22 2012
STATUS
approved