Search: id:A072820 Results 1-1 of 1 results found. %I A072820 %S A072820 1,1,3,3,5,4,5,5,7,6,9,8,9,9,11,10,11,11,13,12,13,13,15,14,17,15,17,16, %T A072820 17,17,19,18,19,19,21,20,23,21,23,22,23,23,25,24,25,25,27,26,27,27,29, %U A072820 28,29,28,29,29,31,30,31,31,33,32,33,33,35,33,35,34,37,35,37,36,37,37 %N A072820 Largest number of distinct primes to represent n as arithmetic mean. %H A072820 Reinhard Zumkeller, Representing integers as arithmetic means of primes %e A072820 a(20)=7: (2+3+5+23+29+31+47)/7 = 20. %p A072820 Contribution from Alois P. Heinz (heinz(AT)hs-heilbronn.de), Aug 03 2009: (Start) %p A072820 sp:= proc(i) option remember; `if` (i=1, 2, sp(i-1) +ithprime(i)) end: %p A072820 b:= proc(n, i, t) 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, 1, 0) else h := b(n, prevprime(i), t); b(n, i, t):= `if` (h>0, h, b(n-i, prevprime(i), t-1)) fi end: %p A072820 a:= proc(n) local i, k; if n<4 then 1 else for k from 2 while sp(k)/k<=n do od: do k:= k-1; if b(k*n, nextprime (k*n -sp(k-1)-1), k)>0 then break fi od; k fi end: seq (a(n), n=2..50); (End) %Y A072820 Cf. A072701. %Y A072820 Sequence in context: A094439 A122037 A008316 this_sequence A131950 A116192 A090104 %Y A072820 Adjacent sequences: A072817 A072818 A072819 this_sequence A072821 A072822 A072823 %K A072820 nonn %O A072820 2,3 %A A072820 Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Jul 15 2002 %E A072820 More terms from Alois P. Heinz (heinz(AT)hs-heilbronn.de), Aug 03 2009 Search completed in 0.001 seconds