This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A072821 #21 Feb 13 2018 09:14:21 %S A072821 1,1,7,7,13,13,23,19,29,29,43,37,53,47,71,61,79,73,103,89,113,109,139, %T A072821 127,157,139,179,163,199,181,223,199,241,227,271,241,293,271,317,293, %U A072821 349,317,379,349,409,379,439,409,463,439,503,463,523,499,571,523,601 %N A072821 Largest prime that can appear in any representation of n as an arithmetic mean of distinct primes. %C A072821 Thanks to _John W. Layman_ for inspiration. %H A072821 Alois P. Heinz, <a href="/A072821/b072821.txt">Table of n, a(n) for n = 2..100</a> %H A072821 Reinhard Zumkeller, <a href="/A072701/a072701.txt">Representing integers as arithmetic means of primes</a> %e A072821 a(6) = 13, as 13 is the largest prime in 6 = (5+7)/2 = (2+3+13)/3 = (2+5+11)/3 = (2+3+5+7+13)/5. %p A072821 sp:= proc(i) option remember; `if` (i=1, 2, sp(i-1) +ithprime(i)) end: %p A072821 b:= proc(n, i, t) option remember; local h; if n<0 then 0 elif n=0 then `if` (t=0, 1, 0) elif i=2 then `if` (n=2 and t=1, 2, 0) else `if` (b(n-i, prevprime(i), t-1)>0, i, b(n, prevprime(i), t)) fi end: %p A072821 a:= proc(n) local s, k; s:= 1; for k from 2 while sp(k)/k<=n do s:= max (s, b(k*n, nextprime (k*n -sp(k-1)-1), k)) od: s end: %p A072821 seq(a(n), n=2..40); # _Alois P. Heinz_, Aug 03 2009 %t A072821 sp[i_] := sp[i] = If[i == 1, 2, sp[i - 1] + Prime[i]]; %t A072821 b[n_, i_, t_] := b[n, i, t] = Which[n < 0, 0, n == 0, If[t == 0, 1, 0], i == 2, If[n == 2 && t == 1, 1, 0], True, If[b[n - i, NextPrime[i, -1], t - 1] > 0, i, b[n, NextPrime[i, -1], t]]]; %t A072821 a[n_] := Module[{s, k}, s = 1; For[k = 2, sp[k]/k <= n, k++, s = Max[s, b[k*n, NextPrime[k*n - sp[k - 1] - 1], k]]]; s]; %t A072821 Table[a[n], {n, 2, 60}] (* _Jean-François Alcover_, Feb 13 2018, after _Alois P. Heinz_ *) %Y A072821 Cf. A072701. %K A072821 nonn %O A072821 2,3 %A A072821 _Reinhard Zumkeller_, Jul 15 2002 %E A072821 More terms from _Alois P. Heinz_, Aug 03 2009