Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A072821
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A072821 Largest prime that can appear in any representation of n as an arithmetic mean of distinct primes. +0
2
1, 1, 7, 7, 13, 13, 23, 19, 29, 29, 43, 37, 53, 47, 71, 61, 79, 73, 103, 89, 113, 109, 139, 127, 157, 139, 179, 163, 199, 181, 223, 199, 241, 227, 271, 241, 293, 271, 317, 293, 349, 317, 379, 349, 409, 379, 439, 409, 463, 439, 503, 463, 523, 499, 571, 523, 601 (list; graph; listen)
OFFSET

2,3

COMMENT

Thanks to John Layman for inspiration.

LINKS

Reinhard Zumkeller, Representing integers as arithmetic means of primes

EXAMPLE

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.

MAPLE

Contribution from Alois P. Heinz (heinz(AT)hs-heilbronn.de), Aug 03 2009: (Start)

sp:= proc(i) option remember; `if` (i=1, 2, sp(i-1) +ithprime(i)) end:

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:

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: seq (a(n), n=2..40); (End)

CROSSREFS

Cf. A072701.

Sequence in context: A003883 A116934 A143429 this_sequence A038589 A109539 A109541

Adjacent sequences: A072818 A072819 A072820 this_sequence A072822 A072823 A072824

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Jul 15 2002

EXTENSIONS

More terms from Alois P. Heinz (heinz(AT)hs-heilbronn.de), Aug 03 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 4 08:07 EST 2009. Contains 170310 sequences.


AT&T Labs Research