Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A072701
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A072701 Number of ways to write n as the arithmetic mean of a set of distinct primes. +0
9
0, 1, 1, 2, 3, 4, 5, 10, 9, 18, 19, 40, 37, 80, 79, 188, 163, 385, 355, 855, 738, 1815, 1555, 3796, 3237, 8281, 6682, 17207, 13967, 35370, 28575, 74385, 58831, 153816, 119948, 312288, 244499, 643535, 495011, 1309267, 997381, 2629257, 2004295, 5334522 (list; graph; listen)
OFFSET

1,4

COMMENT

a(n) = #{ m | A072700(m)=n};

a(n) < A066571(n).

LINKS

Reinhard Zumkeller, Representing integers as arithmetic means of primes

EXAMPLE

a(6)=4, as 6 = (5+7)/2 = (2+3+13)/3 = (2+5+11)/3 = (2+3+5+7+13)/5;

a(7)=5, as 7 = 7/1 = (3+11)/2 = (3+5+13)/3 = (3+7+11)/3 = (3+5+7+13)/4.

MAPLE

sp:= proc(i) option remember; `if` (i=1, 2, sp(i-1) +ithprime(i)) end: b:= proc(n, i, t) 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 b(n, i, t):= b(n, prevprime(i), t) +b(n-i, prevprime(i), t-1) fi end: a:= proc(n) local s, k; s:= `if` (isprime(n), 1, 0); for k from 2 while sp(k)/k<=n do s:= s +b(k*n, nextprime (k*n -sp(k-1)-1), k) od; s end: seq (a(n), n=1..28); [From Alois P. Heinz (heinz(AT)hs-heilbronn.de), Jul 20 2009]

MATHEMATICA

Needs["DiscreteMath`Combinatorica`"]; a = Drop[ Sort[ Subsets[ Table[ Prime[i], {i, 1, 20}]]], 1]; b = {}; Do[c = Apply[Plus, a[[n]]]/Length[a[[n]]]; If[ IntegerQ[c], b = Append[b, c]], {n, 1, 2^20 - 1}]; b = Sort[b]; Table[ Count[b, n], {n, 1, 20}]

t = Table[0, {200}]; k = 2; lst = Prime@Range@25; While[k < 2^25+1, slst = Flatten@Subsets[lst, All, {k}]; If[Mod[Plus @@ slst, Length@slst] == 0, t[[(Plus @@ slst)/(Length@slst)]]++ ]; k++ ]; t (* Robert G. Wilson v *)

CROSSREFS

Cf. A072700, A072697, A072820, A072821.

Sequence in context: A072620 A072619 A161657 this_sequence A037473 A007092 A047596

Adjacent sequences: A072698 A072699 A072700 this_sequence A072702 A072703 A072704

KEYWORD

nonn

AUTHOR

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

EXTENSIONS

Corrected by John Layman, Jul 11, 2002

More terms from Alois P. Heinz (heinz(AT)hs-heilbronn.de), Jul 20 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 November 24 19:42 EST 2009. Contains 167435 sequences.


AT&T Labs Research