OFFSET
1,2
COMMENTS
Odd numbers k which are terms of this sequence are 57, 61, 353, 2113, ...
Approximate self-similar growing patterns appear at different scales which suggest a fractal-like structure, see plots in Links section.
LINKS
Altug Alkan, Table of n, a(n) for n = 1..10000
Andres Cicuttin, Several plots showing similar stair-like patterns
EXAMPLE
a(1) = 0 because only option is p = q = 1.
a(4) = a(8) = 6 because (prime(4) + prime(4)) mod 8 = (prime(8) + prime(7)) mod 15 = 6 is the largest remainder for both.
a(31) = 57 because (prime(28) + prime(31)) mod 59 = 57 is the largest remainder.
MATHEMATICA
a[n_]:=Table[Table[Mod[Prime[j]+Prime[i], i+j], {i, 1, j}], {j, 1, n}]//Flatten//Max;
Table[a[n], {n, 1, 100}]
PROG
(PARI) a(n) = vecmax(vector(n, q, vecmax(vector(q, p, (prime(p)+prime(q)) % (p+q)))));
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Andres Cicuttin and Altug Alkan, Apr 12 2018
STATUS
approved