

A039731


a(n)=MAX{p(n) mod q, where prime q < p(n)=nth prime}.


3



1, 2, 2, 4, 6, 6, 8, 10, 12, 14, 18, 18, 20, 18, 24, 28, 30, 30, 34, 36, 38, 40, 42, 44, 48, 50, 48, 50, 54, 60, 64, 66, 68, 70, 72, 78, 80, 78, 84, 82, 84, 94, 96, 96, 98, 104, 110, 100, 102, 106, 112, 114, 124, 126, 126, 132, 134, 138
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

2,2


COMMENTS



LINKS



PROG

(PARI) a(n) = {maxp = 0; for (i = 1, n1, mp = prime(n) % prime(i); maxp = max(mp, maxp); ); maxp; } \\ Michel Marcus, Oct 01 2013
(PARI) P=primes(100); vector(#P, i, mx=0; for(j=1, i1, mx=max(P[i]%P[j], mx)); mx)[2..#P] \\ Charles R Greathouse IV, Oct 01 2013


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



